I have a script that replaces document.getElementById with a caching version of that. Everything works fine except that when I delete a node then try to access it again I get a reference to the "Dead" node.
So my question is: how do I actually DELETE a DOM node? "obj.parentNode.removeChild(obj)" simply removes it from the document and "delete obj" doesn't work.
var n = document.getElementById('test');
var x = n;
// Start Modifying any code. do NOT change x itself
// End modifying any code
alert(x); // I want this to be null or undefined