system module loader

Mike Samuel mikesamuel at gmail.com
Thu Mar 8 09:27:46 PST 2012


http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders mentions
a system module loader.

Has the behavior of the system module loader been speced at all?

If not, would it be worthwhile specifying that when it loads an http
or https URL, it does so with a fairly minimal Accept header that
excludes non-script mime-types, especially text/html and */*:

    Accept: application/javascript;version=next, application/javascript

or whichever is the preferred mime-type.

Such a hint might be of use to application frameworks like RoR that
have a translation pipeline so that when the accept header does not
include application/javascript;version=next then they can try and
desugar to ES5, but when the user-agent does, they can deliver
individual modules with spiffy new features.


More information about the es-discuss mailing list