On Thu, Jun 20, 2013 at 10:26 AM, Kevin Smith <[email protected]> wrote:
> I wonder, though, if this might create issues for polyfilling:
>
> // polyfillz.js
> if (this.Promise === void 0)
> this.Promise = function() { ... }
>
> // main.js
> import "polyfillz.js";
> new Promise();
>
> This would refuse to compile, right? We'd have to introduce all of our
> polyfills in a separate (previous) compilation/execution cycle.
Yes, like so:
<script src="polyfillz.js"/>
Note that this is already the way people suggest using polyfills; see
[1] for an example.
Sam
[1] https://github.com/axemclion/IndexedDBShim
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss