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

Adding an event handler in an event handler can lead to infinite looping #511

Closed
jcmoore opened this issue May 20, 2014 · 1 comment · Fixed by googlearchive/ShadowDOM#440

Comments

@jcmoore
Copy link
Contributor

jcmoore commented May 20, 2014

Example here:

https://gist.github.com/jcmoore/38135abefad78dc41e79#file-examlple-html-L14-L30

Not sure what the implications would be, but a solution might be as simple as using the "initial" length of the listeners array in the loop condition (instead of using the "current" length) for ShadowDOM/src/wrappers/events.js' invoke() method:

https://gist.github.com/jcmoore/38135abefad78dc41e79#file-shadowdom-src-wrappers-events-js-L385-L387

@arv
Copy link
Contributor

arv commented May 21, 2014

Yeah. Native does not add the functions to the current listeners. I'll update.

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 a pull request may close this issue.

2 participants