Dynamically changing of loader global
dherman at mozilla.com
Wed Dec 26 14:14:17 PST 2012
On Dec 24, 2012, at 2:34 PM, David Bruant <bruant.d at gmail.com> wrote:
> I've reading the loader API  and I was wondering if it was possible to dynamically change the global. I think it is by doing the following, but tell me if I'm wrong:
That wasn't the intention. It probably wasn't written out since the full semantics isn't spelled out yet (though Sam and I have been making good progress working through the details of the semantics), but the idea was that the properties of the options object are read in up-front and stored internally. The getter always returns that internally closed-over value that was obtained when the loader was first created.
> In other words, in the global in the loader the initial or the dynamic value of the "global" option?
The initial value. We can look into what it would mean to make it modifiable, but we'd probably not make that the API; we'd probably just have a setter.
> If it was the dynamic value, I think it would help a lot in the document.open situation 
>  http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders#loader_api
>  http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0166.html
Thanks, I'll read up on this.
More information about the es-discuss