beegee said:
Better than what? You seem to have fallen victim to the delusion that I
would need to prove or explain anything here, especially to you.
Now take a crack at this one:
I think you made this up.
I really don't care what you think as you are obviously ignorant of the most
simple basics, how object references work in the languages that we are
discussing here; let alone of the more elaborate part, how the W3C DOM API
works.
JFTR: The use of an API function in order to create an object (and return a
reference to it) (here: Document::createElement()) does not necessitate
registration of that object anywhere. Even if so, that object would not
yet be part of the data structure relevant here, the document tree, because
the API function simply is lacking information about where to insert it.
And if you cared to read the Spec instead of indulging in your fantasies,
you would have known:
<
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-2141741547>
<
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-184E7107>
I can certainly successfully retrieve the element via
document.getElementById() right after I create it whether
its attached to the DOM tree or not.
You are welcome to try and fail:
var div = document.createElement("div");
div.id = "foo";
// null (in Firefox 3.0.5/Linux)
console.log(document.getElementById("foo"));
Bah. I'm done here. We could trade opinions all night and day.
It's not just opinions, though. I am stating facts or at least very
probable circumstances, given the documentation, while you are telling
about what you are capable of imagining.
Score adjusted
PointedEars