T
Tim Streater
Suppose (in JavaScript) I get a pointer to an element, this:
myPtr = document.getElementById ("wiggy");
and then I do this:
document.appendChild (myPtr);
does this move the element from wherever it was in the DOM, to the end
of the document? From some code I've seen I guess it must, because doing
this and then examining the DOM (with Safari web inspector) I see the
object at the end. Yet I've not seen this noted explicitly anywhere.
But I would have expected to have needed to do removeChild first.
myPtr = document.getElementById ("wiggy");
and then I do this:
document.appendChild (myPtr);
does this move the element from wherever it was in the DOM, to the end
of the document? From some code I've seen I guess it must, because doing
this and then examining the DOM (with Safari web inspector) I see the
object at the end. Yet I've not seen this noted explicitly anywhere.
But I would have expected to have needed to do removeChild first.