Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » swt, xulrunner 10, and Javascript XPCOM calls
swt, xulrunner 10, and Javascript XPCOM calls [message #1004690] Wed, 23 January 2013 17:10 Go to next message
Mark Fishman is currently offline Mark Fishman
Messages: 27
Registered: March 2011
Junior Member
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 17:38 Go to previous message
Mark Fishman is currently offline Mark Fishman
Messages: 27
Registered: March 2011
Junior Member
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.
Previous Topic:Windows 7 issues
Next Topic:Offset of last visible character in a StyledText control
Goto Forum:
  


Current Time: Sat Sep 20 05:59:53 GMT 2014

Powered by FUDForum. Page generated in 0.01617 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software