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

Bugfix? requestAnimationFrame being called forever #93

Closed

Conversation

amyleesalesforce
Copy link

Maybe a fix?

It seems that requestAnimationFrame is called forever because it's inside the oninterval() callback. But by moving it into the while() loop the requestAnimationFrame() will only called back if there are still use tags to replace.

… prevent requestAnimationFrame being called forever.
@fregante
Copy link
Contributor

I think #86 fixed this

@jonathantneal
Copy link
Owner

@amyleesalesforce, thanks for your optimization. So, I am calling requestAnimationFrame forever because I am using it to listen to changes in the DOM that may include new <use> tags. This is obviously not an ideal way to listen to changes in the DOM, since we have awesome things like Mutation Observers that might work better, as long as we use fallbacks down to IE9 or IE8.

I’m really hoping someone (you? or maybe #33) could move me in that direction.

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.

3 participants