HNHacker News
TopNewBestAskShowJobs

derekcicerone

2 karma · joined August 21, 2011

submissionscomments
derekcicerone··on Single Page Web Apps with Backbone.js
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)