Olaf wrote:
To get the JS* objects I call GetGlobalJSObject() on the global object
and GetNativeContext() on the Context. With these two I call
JS_DefineFunction, which returns a valid pointer. But when I load a
test HTML page and call my function, nothing happens. I call:
var res = "none";
res = MyFunctionName(-22);
alert(res);
Do you set the function at each pageload?
Where MyFunctionName should implement abs (just for testing). I'm
assuming that the function I define is not global to all contexts (or
runtimes) and that I get a new context when I load the page.
You keep the context, but you get a new inner window (effectively, all
properties in the scope are cleared to prevent one web page from seeing
properties another web page set).
-Boris
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding