Is there a recommended mechanism to register a binding to the
JavaScript interpreter, preferable before the page is loaded?

The goal is to implement a function which takes a name
(a String) and a JSValue and adds a property on the global (window)
object with the given name and value.  Of course this is easy enough
to do in a running interpreter - for example using JSObjectSetProperty.
The trick is to pre-register the binding before the load starts, and
I don't know enough of interpreter initialization (for example
when the window object is created) to see a good place to do this.
I'm hoping someone who knows the code better can give a hint or two.

This can't be a new requirement.  For example the old LiveConnect
would pre-register the name "java" to a magic object to enable
things like 'new java.util.ArrayList()'.  We'd like to do something
similar, though for a Java-programmer-supplied name and value.
--
        --Per Bothner
[email protected]   [email protected]   http://per.bothner.com/
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to