Re: Delaying execution of modules in the loader

2014-08-22 Thread Kevin Smith
On Tue, Aug 19, 2014 at 2:55 PM, Guy Bedford guybedf...@gmail.com wrote: The loader is designed to enable deferred execution, but there isn't an easy hook to allow this that I know of. System.define is the only load function that does not ensure execution. The others (System.import,

Delaying execution of modules in the loader

2014-08-19 Thread Ian Hickson
It would be helpful if there was a way that the module _execution_ (after it's been parsed and dependencies have been extracted) could be delayed by the loader. Suppose a page is loading and has reached a quiescent state, and so the browser thinks ok, time to preload some scripts. It might

Re: Delaying execution of modules in the loader

2014-08-19 Thread Guy Bedford
The loader is designed to enable deferred execution, but there isn't an easy hook to allow this that I know of. System.define is the only load function that does not ensure execution. The others (System.import, System.load, System.module), run an EnsureEvaluated call to run the scripts. It could

Re: Delaying execution of modules in the loader

2014-08-19 Thread Ian Hickson
On Tue, 19 Aug 2014, Guy Bedford wrote: The loader is designed to enable deferred execution, but there isn't an easy hook to allow this that I know of. System.define is the only load function that does not ensure execution. The others (System.import, System.load, System.module), run an