Loading ...
Sorry, an error occurred while loading the content.

Re: error on deleting removed node from dom

Expand Messages
  • marcelduran
    ... var node = document.getElementById( foo ); console.log(delete node.parentNode.removeChild(node)); // true
    Message 1 of 5 , Aug 29, 2009
    • 0 Attachment
      > > var node = document.getElementById('foo');
      > > delete node.parentNode.removeChild(node);
      > >
      > > Works fine, but JSLint is complaining:
      >
      > You must be aware that code can be seriously wrong
      > and still appear to work fine.
      >
      var node = document.getElementById('foo');
      console.log(delete node.parentNode.removeChild(node)); // true
    Your message has been successfully submitted and would be delivered to recipients shortly.