W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2009

[whatwg] Global Script proposal

From: Patrick Mueller <pmuellr@muellerware.org>
Date: Fri, 21 Aug 2009 16:40:29 -0400
Message-ID: <4A8F063D.7060505@muellerware.org>
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
Received on Friday, 21 August 2009 13:40:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:15 UTC