Integrating the Webs' dependency systems

Ian Hickson ian at
Thu May 29 09:50:44 PDT 2014

On Thu, 29 May 2014, Kevin Smith wrote:
> >
> > Ok. I'm not really sure how to extend the ES6 module system in a way 
> > that won't stomp on this working group. How do I (at the spec level) 
> > tell the ES6 module system that it should not evaluate a particular 
> > module until some non-script resource, e.g. a style sheet, is 
> > available? It seems like it needs a closer integration with load 
> > records than the APIs would enable. For example, would we be able to 
> > hook the CSS @import loading mechanism into load records? How about 
> > marking a load as low-priority, is that something we can do with load 
> > records?
> So, what we currently have is ES6 defining a dependency loading 
> framework and a requirement that the host environment satisfy the 
> contract represented by that framework.
> An alternative might be to assume that host environment defines a 
> loading framework available through some global, promise-returning 
> primatives, and defining ES module loading in terms of those primatives.  
> I think this would entail moving much of the loader pipeline into HTML, 
> and allowing the ES spec to focus specifically on linkage.
> My intuition says that this would be a better overall design, since it 
> would bring all resource loading concerns under a common subsystem using 
> a common resource model.
> Are you thinking along these same general lines?

That's an option. I don't have an opinion on whether this is the better 
way to go or whether ES6 should be extended to provide what is needed to 
define the plumbing for other features, nor do I mind who writes the spec 
text. My only opinion here really is that I think we should make sure the 
Web doesn't end up with multiple redundant dependency systems.

On Thu, 29 May 2014, John Barton wrote:
> My intuition is that any such plan would be vigorously opposed by the JS 
> community.

Then it's probably not a good plan.

This suggests that the plan should be to instead make sure that whatever 
ES6 defines can be used by other specs to define the Web's loading model. 
Is extending the ES6 model (not the API, but the underlying model with 
load records and so on) something that could be on the table?

Ian Hickson               U+1047E                )\._.,--....,'``.    fL       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the es-discuss mailing list