swt, xulrunner 10, and Javascript XPCOM calls [message #1004690] |
Wed, 23 January 2013 12:10  |
Eclipse User |
|
|
|
I have switched my embedded browser component in my SWT application from xulrunner 3.6 to xulrunner 10. However, in doing so, I have run into a problem. When using xulrunner 3.6, I could do a
Browser browser = new Browser(parent, SWT.Mozilla);
and then do a call like:
browser.execute(javascriptString);
where the javascriptString did some xpcom calls.
However, after I switched to xulrunner 10, when I make a javascript call like:
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
I get a "Permission denied for <moz-safe-about:blank> to get property: XPComponents.classes" error message.
This may be more of a xulrunner rather than SWT Browser integration question but I was wondering if anyone else has run into this problem and figured out a way to re-enable this capability.
Thanks.
-- Mark
|
|
|
Re: swt, xulrunner 10, and Javascript XPCOM calls [message #1005238 is a reply to message #1004690] |
Thu, 24 January 2013 12:38  |
Eclipse User |
|
|
|
As a followup. I was finally able to access the javascript xpcom interfaces. However, to do it, I had to wait until the browser was rendered and the first page was fully loaded. I am not sure why this is. This is not how it worked in earlier versions of SWT/XulRunner integrations.
|
|
|
Powered by
FUDForum. Page generated in 0.06397 seconds