4

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.

2
  • Are you sure that window.Firebug exists? The script you linked to adds a FirebugLite element, not Firebug. Commented Nov 25, 2012 at 14:31
  • I believe that exists because when I call windows.Firebug.Shutdown(); Firebug disappears form the screen. Commented Nov 26, 2012 at 8:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.