I am creating JS objects that have some properties that contain DOM nodes, and some of these DOM nodes have event listeners attached to them.
When I delete such objects, do I first need to remove the event listeners attached to some of the DOM nodes? And do I need to use removeChild on the DOM nodes that are properties of the object?
unless this is an open-all-day script that has to run in IE 6/7 i wouldn't worry about it.
you should use event delegation upon a parent to remove any gotchas associated with pesky element/event closures on disposable elements.
i mis-read the question.
you can just delete them from your mixed property object without harm.
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)