Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Browser Support #54

Closed
mcordingley opened this issue Oct 29, 2014 · 8 comments
Closed

Native Browser Support #54

mcordingley opened this issue Oct 29, 2014 · 8 comments

Comments

@mcordingley
Copy link

I'm not sure if this polyfill can be used directly in a browser without some third-party module system. Can you add support for vanilla browser usage, if that's missing, and documentation on how to use the polyfill in that situation?

Thanks!

@yethee
Copy link

yethee commented Oct 29, 2014

You can use any link from Downloads section.

For example:

<script src="https://es6-promises.s3.amazonaws.com/es6-promise-2.0.0.min.js"></script>

@mcordingley
Copy link
Author

Sure, but what browser global, if any, does it expose if a module system is not present? Or, does it auto polyfill Promise as a global in that case? The README only really covers what to do with the return value of require(), which doesn't apply in this circumstance.

@stefanpenner
Copy link
Owner

window.Promise = window.ES6Promise

We can likely expose the polyfil on the ES6Promise namespace as ES6Promise.polyfil() but this is not currently the case

@mcordingley
Copy link
Author

@stefanpenner That's what I'm looking for. Thanks! Would be lovely if the README had that in it.

@jgehrcke
Copy link

jgehrcke commented Nov 8, 2014

Part of my code calls new Promise(), which threw a ReferenceError in IE11. I have then included this polyfill via <script src="bower_components/es6-promise/promise.min.js"></script> and the error is gone. So in which case do we still need to call window.Promise = window.ES6Promise?

@usmonster
Copy link

@jgehrcke I think you'd be interested in #59 & #65.

@stefanpenner
Copy link
Owner

we will make it auto-polyfil

@stefanpenner
Copy link
Owner

master does this, soon after @jakearchibald has time to vet + audit, we will release a new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants