Quantcast

Accessing XPConnect from a stand-alone XUL application

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Accessing XPConnect from a stand-alone XUL application

final74
Hi

Is it possible to access XPConnect fully from a XUL application?

I have been experimenting with XUL, JS and XPConnect but have hit a brick wall.
Specifically I tried the introduction on the MDN site, here:

https://developer.mozilla.org/en-US/docs/XPConnect/Using_components

After this:

var Cc = Components.classes;
var Ci = Components.interfaces;

.. .both Cc and Ci are set. However, if I then try the next step the result is 'undefined':

var rc = Cc["@mozilla.org/registry;1"];

I've tried to dig into this further but I'm not getting very far. I suspect it just can't be done from a stand-alone app. for security reasons (?)

Any help/pointers gratefully received.


Thanks
_______________________________________________
dev-tech-xpcom mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpcom
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Accessing XPConnect from a stand-alone XUL application

Y a Personne
Le 6/03/2013 21:58, final74 a écrit :

> Hi
>
> Is it possible to access XPConnect fully from a XUL application?
>
> I have been experimenting with XUL, JS and XPConnect but have hit a brick wall.
> Specifically I tried the introduction on the MDN site, here:
>
> https://developer.mozilla.org/en-US/docs/XPConnect/Using_components
>
> After this:
>
> var Cc = Components.classes;
> var Ci = Components.interfaces;
>
> .. .both Cc and Ci are set. However, if I then try the next step the result is 'undefined':
>
> var rc = Cc["@mozilla.org/registry;1"];
>
> I've tried to dig into this further but I'm not getting very far. I suspect it just can't be done from a stand-alone app. for security reasons (?)
>
> Any help/pointers gratefully received.
>
>
> Thanks
>

You can use XPCom in XULRunner or in Firefox extension
_______________________________________________
dev-tech-xpcom mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpcom
Loading...