[whatwg] Global Script proposal
Patrick Mueller
pmuellr at muellerware.org
Fri Aug 21 13:40:29 PDT 2009
Michael Nordman wrote:
> I'm confused about the manual loading of the script into the context? The
> original proposal called for providing a script url when creating/connecting
> to an instance of a global-script... in which case each client page
> expresses something more like...
> globalScript = new GlobalScript(scriptUrl);
> globalScript.onload = myFunctionThatGetsCalledWhenTheScriptIsLoaded;
> // some time later onload fires, if the script was already loaded, its
> called on the next time thru the message loop
Here's what Dmitry Titov proposed on 2009/08/17:
var context = new GlobalScript();
context.onload = function () {...}
context.onerror = function () {...}
context.load('foo.js');
--
Patrick Mueller - http://muellerware.org
More information about the whatwg
mailing list