[Project_owners] Global listeer

Eric H. Jung eric.jung at yahoo.com
Tue Nov 20 08:24:09 PST 2007


--- joe ertaba <belaviyo at gmail.com> wrote:
> in
> 
> MyComponent.prototype = {
> ...
> MyVar:'hello',
> ....
> }
> 
> how can access it from my extension
> i want to write/read it as a global variable

Use the wrappedJS trick (search MDC for info). You'll be able to do this from your extension:

var myService = Component.classes["@joeertaba.org/myext/service;1"].getService().wrappedJSObject;
myService.hello = "world!";



More information about the Project_owners mailing list