Skip to content

Make event handling asynchronous #425

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

Merged
merged 5 commits into from
Aug 20, 2013

Conversation

alancutter
Copy link
Contributor

When players are played in the end event of the last player they do not get played.
Making the events fire asynchronously fixes the problem by allowing player registration to occur at the appropriate time.

@alancutter
Copy link
Contributor Author

The testharness can't handle two levels of asynchronousicity unfortunately so the test for this bug has to be manual.

var element = document.querySelector('#target');
var animation = new Animation(element, { left: '50px' }, 0.5);
animation.addEventListener('end', function() {
console.log('testpants');
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be 'testPants' for consistency?

Copy link
Contributor

Choose a reason for hiding this comment

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

On second thoughts best not to have logging at all ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The non-camel cased debug print comes back to haunt me!
Yes it should be testPants and yes it should not be there. :)

dstoc added a commit that referenced this pull request Aug 20, 2013
@dstoc dstoc merged commit 9d27d85 into web-animations:master Aug 20, 2013
@alancutter alancutter deleted the addPlayerInEventBug branch November 15, 2013 02:50
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

Successfully merging this pull request may close these issues.

2 participants