Re: Changing dependencies during the load process.

2014-08-20 Thread Ian Hickson
On Wed, 20 Aug 2014, John Barton wrote: > On Wed, Aug 20, 2014 at 3:23 PM, Ian Hickson wrote: > > On Wed, 20 Aug 2014, John Barton wrote: > > > > > > > > > > The reverse case, where a img depends on a script, is not a use > > > > > case. > > > > > > > > Why not? What if the image has an onmouseov

Re: Changing dependencies during the load process.

2014-08-20 Thread John Barton
On Wed, Aug 20, 2014 at 3:23 PM, Ian Hickson wrote: > On Wed, 20 Aug 2014, John Barton wrote: > > > > > > > > The reverse case, where a img depends on a script, is not a use > > > > case. > > > > > > Why not? What if the image has an onmouseover handler that calls an > > > API function defined in

Re: Changing dependencies during the load process.

2014-08-20 Thread Ian Hickson
On Wed, 20 Aug 2014, John Barton wrote: > > > > > > The reverse case, where a img depends on a script, is not a use > > > case. > > > > Why not? What if the image has an onmouseover handler that calls an > > API function defined in a module, for instance? > > Then the page depends on the onmouse

Re: Changing dependencies during the load process.

2014-08-20 Thread John Barton
On Tue, Aug 19, 2014 at 4:25 PM, Ian Hickson wrote: > On Mon, 18 Aug 2014, John Barton wrote: > > > > > > (For example, a graphical game might need some sprite assets to be > > > loaded before it can start up. So its might be marked as > > > depending on an element that loads that image. O

Re: Changing dependencies during the load process.

2014-08-19 Thread Ian Hickson
On Mon, 18 Aug 2014, John Barton wrote: > > > > (For example, a graphical game might need some sprite assets to be > > loaded before it can start up. So its might be marked as > > depending on an element that loads that image. Or the script > > contents might have an import statement tha

Re: Changing dependencies during the load process.

2014-08-19 Thread Ian Hickson
On Mon, 18 Aug 2014, John Barton wrote: > > Your examples use script. I just don't think now that we should use the > same solution for HTML. We should analyze the HTML requirements and design > a solution. If the result is similar to script then we can reuse. That's what I've been doing. My con

Re: Changing dependencies during the load process.

2014-08-18 Thread John Barton
On Mon, Aug 18, 2014 at 5:32 PM, Ian Hickson wrote: > On Mon, 18 Aug 2014, John Barton wrote: > ... > > But in the case of image tags we already know exactly which image the > > HTML depends upon. > > But other elements might depends on the , and that we don't know. > (For example, a graphic

Re: Changing dependencies during the load process.

2014-08-18 Thread John Barton
On Mon, Aug 18, 2014 at 2:00 PM, Ian Hickson wrote: > On Mon, 18 Aug 2014, John Barton wrote: > > On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson wrote: > > > On Fri, 15 Aug 2014, John Barton wrote: > > > > On Fri, Aug 15, 2014 at 3:41 PM, Ian Hickson wrote: > > > > > On Fri, 15 Aug 2014, John Ba

Re: Changing dependencies during the load process.

2014-08-18 Thread Ian Hickson
On Mon, 18 Aug 2014, John Barton wrote: > On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson wrote: > > On Fri, 15 Aug 2014, John Barton wrote: > > > On Fri, Aug 15, 2014 at 3:41 PM, Ian Hickson wrote: > > > > On Fri, 15 Aug 2014, John Barton wrote: > > > > > > > > > > The ES Loader does not maintain

Changing dependencies during the load process.

2014-08-18 Thread John Barton
On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson wrote: > > > On Fri, 15 Aug 2014, John Barton wrote: > > On Fri, Aug 15, 2014 at 3:41 PM, Ian Hickson wrote: > > > On Fri, 15 Aug 2014, John Barton wrote: > > > > > > > > The ES Loader does not maintain a dependency tree. It maintains a > > > > table

Re: Changing dependencies

2014-08-15 Thread John Barton
On Fri, Aug 15, 2014 at 3:41 PM, Ian Hickson wrote: > On Fri, 15 Aug 2014, John Barton wrote: > > > > The ES Loader does not maintain a dependency tree. It maintains a table > of > > names->modules. > > Maybe I'm misunderstanding the ES6 loader spec. What's the Load Record > [[Dependencies]] list

Re: Changing dependencies

2014-08-15 Thread Ian Hickson
On Fri, 15 Aug 2014, John Barton wrote: > > The ES Loader does not maintain a dependency tree. It maintains a table of > names->modules. Maybe I'm misunderstanding the ES6 loader spec. What's the Load Record [[Dependencies]] list? (If ES6 isn't maintaining the dependency tree, then this would ma

Re: Changing dependencies

2014-08-15 Thread John Barton
The ES Loader does not maintain a dependency tree. It maintains a table of names->modules. So when the @import rules mutate, just load the new names. Any new modules will be traversed for dependents and new name->modules entries will be created. Well, assuming you figure out how to integrate CSS p

Changing dependencies

2014-08-15 Thread Ian Hickson
ES6 modules are immutable, but some things on the Web platform that might have dependencies can have those dependencies change over time. For example, CSS style sheets have a mutable object model, and one of the things in that object model is their list of @imports, so you can dynamically chan