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

Rewrite javascript Promise as callback for IE compatibility #9

Merged
merged 1 commit into from Sep 22, 2016

Conversation

chrisbeach
Copy link
Contributor

No description provided.

timer = setTimeout(function () {
callback(false);
}, timeout);
img.src = url;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is similar to the logic in the previous implementation, but I'm skeptical about it as I wonder if there's a danger of the img variable going out of scope and img.onload not being called? Despite this concern the function seems to work consistently in my testing

@angusmcleod
Copy link
Member

@chrisbeach Reviewing this now...

@angusmcleod
Copy link
Member

@chrisbeach Works well. Thanks.

@angusmcleod angusmcleod merged commit c46a257 into paviliondev:master Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants