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().
Thanks for the tip about this script loader, I did not know Mozilla had such a capability.
It works nicely, i.e. the code is 'imported' correctly, I can instanciate the HandlerOverride... but it still 'crash' when I use getter and setters on this object. However, if I add a normal function in the HandlerOverride prototype, this function can be called without problem. Maybe the JavaScript engine only supports a subset of JavaScript while in autoconfig 'mode' ?
Cheers,
-- Damiano ALBANI
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
