Module import/export bindings

Glen Huang curvedmark at
Mon Mar 16 02:57:54 UTC 2015

My guess is that it’s for importing modules that expose objects via the global object (e.g., window).

However I do have a question: is it possible for a module to access the global object without relying on the host environment?

One use case is to polyfill the language's standard library. es6-shim uses a pretty ugly hack ( <>).

I wonder what’s the most elegant way to do that?

> On Mar 16, 2015, at 3:59 AM, Kyle Simpson <getify at> wrote:
> Thanks, all answers super helpful!
> One last clarification:
> ```js
> import "foo";
> ```
> This doesn't do any binding does it? AFAICT, it just downloads and runs the module (if it hasn't already)?
> If that's true, what's the use-case here besides "preloading" a module performance wise?
> _______________________________________________
> es-discuss mailing list
> es-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list