xpcom array can transfer in different xul files ?

Posted by jin on Stack Overflow See other posts from Stack Overflow or by jin
Published on 2010-06-06T06:35:33Z Indexed on 2010/06/06 6:42 UTC
Read the original article Hit count: 446

Now I am developing a firefox extension, can I define a global array in a js with the main xul . and I found when I use it in another js with another xul , it could not worked , so I searched the document of Firefox development. I found a common array can not be transfered between two js files with different xul files. and then I difined a xpcom mutablearray in a js:

var eleList = Components.classes["@mozilla.org/array;1"] .createInstance(Components.interfaces.nsIMutableArray);

but when I want to use it in another js : it still not work , why? Thank you very much!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about firefox