David Bruant (2013-04-08T14:15:01.000Z)
github at esdiscuss.org (2013-07-12T02:26:54.575Z)
> I'd need to have specifics first and they're not in the ES6 draft. I'll try to start with some point I have in mind, others will complete as necessary. From what I know, there are 2 parts: 1. [module syntax](http://wiki.ecmascript.org/doku.php?id=harmony:modules) 2. [module loader API](http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders) As far as 1) the "import" semantics part might need some attention in relation to URLs and how they are resolved (relative to the JS resource url? document url?). There is probably a need for some module name resolution binding to hook with the Fetch algorithm for cases like: ```js import "http://www.mywebsite.com/myScript.js" ``` I don't think 2) will affect the platform; it's its own objects with their own semantics. > I'd like to evaluate the impact of ES6 modules on web platform APIs. > How we'll need to accommodate for them down the road. It might be interesting to start adding new APIs not as global properties or properties in navigator, but rather as built-in modules (I'm not entirely clear on how these are defined/listed/feature detected/what's the import syntax for them). Maybe have WebIDL interpret any interface as a module or something of this kind in an attempt to steer JS devs away from globals. I imagine it might not be possible as I phrased it, but it feels worth investigating. All of that might have to wait until major browser makers all have some support for ES6 modules. I have most certainly forgotten some points, but that can be a start. Anne, are there other points you anticipate could need some discussion?