java - Javafx Webengine only one website seems to be empty -
i'm developing browser opens url www.gumgum.com.
can't figure out why browser loads background image.
all other sites being loaded correctly.
edited example:
import com.sun.javafx.webkit.webconsolelistener; import javafx.application.application; import javafx.scene.scene; import javafx.scene.layout.vbox; import javafx.scene.web.webview; import javafx.stage.stage; import javafx.scene.web.webengine; public class browser extends application { public static void main(string[] args) { system.setproperty("sun.net.http.allowrestrictedheaders", "true"); application.launch(args); } @suppresswarnings("restriction") @override public void start(final stage stage) { webview webview = new webview(); webengine webengine = webview.getengine(); webengine.load("http://www.gumgum.com"); webconsolelistener.setdefaultlistener(new webconsolelistener(){ @override public void messageadded(webview webview, string message, int linenumber, string sourceid) { system.out.println("console: [" + sourceid + ":" + linenumber + "] " + message); } }); vbox root = new vbox(); root.getchildren().add(webview); scene scene = new scene(root); stage.setscene(scene); stage.show(); } }
can give me short advice what's wrong here? webview should able load site properly, or?
thank much,
jin
edit:
i added webconsolelistener , used statement reduce warnings: system.setproperty("sun.net.http.allowrestrictedheaders", "true");
now message left:
console: [http://www.gumgum.com/wp-content/themes/website-wp-theme/dist/js/main.js:2458] syntaxerror: strict mode not allow function declarations in lexically nested statement.
does know how solve last issue?
thanks in advance able provide.
Comments
Post a Comment