Better HN
topnewbestaskshowjobs
Log inSign up

derekcicerone

2 karma · joined Aug 21, 2011 (15y ago) · 1 submissions

Submissions

comment 14y ago · link · parent

Since you usually only want the listeners attached when a view is actually part of the page's DOM, would it be possible to monitor the DOM for when the view is removed and do cleanup automatically based on a DOM event? (perhaps using the mutation DOM events http://en.wikipedia.org/wiki/DOM_Events)