setInterval will clear itself when element is removed from the DOM #98

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

My use-case is an activity feed with only 5 items. However, over the lifetime of the web application, thousands of items pass through the feed.

It was not ideal to have thousands of setInterval calls fire each minute.

scotthovestadt added some commits Nov 15, 2012

setInterval will clear itself when element removed
setInterval will clear itself when element is removed from the DOM.

rupurt commented Sep 25, 2013

Any word on this issue? Single page apps are becoming more common and timeago needs the ability to remove itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment