I can't say anything about your actual problem, but ...
ALBANI damiano aber hob zu reden an und schrieb:
> However, as there's no 'include' or 'import' feature in JavaScript, I
> have to fetch the file and then eval() the code.
... this not quite true for Mozilla.
Even though JS as such doesn't know about 'include' or 'import', you can
use Mozilla's mozIJSSubScriptLoader interface (if you have the rights to
do so):
var context = {};
var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader);
loader.loadSubScript("uri://to/your/file.js", context);
This will load the script file.js into the context of the object
'context', i.e. a contained function foo() will be accessible as
context.foo().
Karsten
--
Freiheit stirbt | Fsayannes SF&F-Bibliothek:
Mit Sicherheit | http://fsayanne.tprac.de/
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom