Results 1 to 2 of 2

Thread: Deleting objects

  1. #1
    Join Date
    Jun 2011

    Deleting objects

    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?

    Or does JavaScript take care of all that?

  2. #2
    Join Date
    Jul 2008
    urbana, il
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center