|
|
@ -86,8 +86,6 @@ public class BBSDialog extends UIDialog { |
|
|
|
view.setMinSize(widthDouble, heightDouble); |
|
|
|
view.setMinSize(widthDouble, heightDouble); |
|
|
|
view.setPrefSize(widthDouble, heightDouble); |
|
|
|
view.setPrefSize(widthDouble, heightDouble); |
|
|
|
final WebEngine eng = view.getEngine(); |
|
|
|
final WebEngine eng = view.getEngine(); |
|
|
|
JSObject obj = (JSObject) eng.executeScript("window"); |
|
|
|
|
|
|
|
obj.setMember("BBSWebBridge", BBSDialog.this);//一定要在load页面之前加载接口
|
|
|
|
|
|
|
|
//webEngine的userAgent貌似支持移动设备的,任何其他浏览器的userAngent都会导致程序崩溃
|
|
|
|
//webEngine的userAgent貌似支持移动设备的,任何其他浏览器的userAngent都会导致程序崩溃
|
|
|
|
//eng.setUserAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) Apple/WebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36");
|
|
|
|
//eng.setUserAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) Apple/WebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36");
|
|
|
|
eng.load(url); |
|
|
|
eng.load(url); |
|
|
|