xpcom array can transfer in different xul files ?
- by jin
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!