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

Specify context in which callbacks are called #58

Closed
domenic opened this issue Dec 30, 2012 · 3 comments
Closed

Specify context in which callbacks are called #58

domenic opened this issue Dec 30, 2012 · 3 comments
Milestone

Comments

@domenic
Copy link
Member

domenic commented Dec 30, 2012

It's left unspecified what context (i.e. this value) onFulfilled and onRejected are called in. Should we specify? I say yes.

I think the obvious choice is undefined (which in sloppy mode becomes the global object), i.e. simply call the function as you normally would.

This prevents the antipattern of using this as a zeroth argument from creeping into implementations, which we currently allow and creates noninteroperable code.

@novemberborn
Copy link
Contributor

+1

@juandopazo
Copy link
Contributor

Yup. +1

@briancavalier
Copy link
Member

Good catch. +1

This issue was closed.
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

4 participants