I want to execute Firebug lite in my webengine and then call some methods from the script. First i execute the script as described in here and its work fine. The problem starts when I try to call and execute a method inside from the script. First I have a 'Exit' button in the webview and in the event of the button i call the method shutdown to close the script. Below is the code:
eng.executeScript("window.Firebug.shutdown();");
The firebug immediately disappears from the webview. Then I have another button 'Start' and in the event i want to open again firebug with the code below, but nothing happens. No errors or exceptions appear and seems that the script executes correctly.
eng.executeScript("window.Firebug.startOpened=true;");
I also try the method initialize() eng.executeScript("window.Firebug.initialize();");
and then i get an exception like below:
netscape.javascript.JSException: TypeError: 'undefined' is not an object
at com.sun.webpane.platform.WebPage.twkExecuteScript(Native Method)
at com.sun.webpane.platform.WebPage.executeScript(WebPage.java:1438)
at javafx.scene.web.WebEngine.executeScript(WebEngine.java:811)
at student.WebBrowser$2.handle(WebBrowser.java:126)
I also want to know which method in the script executes when the user clicks the ShowInNewWindow button and from an JSObject in javafx catch the event and open firebug in a new form.
Thanks in advance.