I have got created a rather complex HTMLElement and would like to know id there is a way to run a getElementById on it before the element gets appended to the DOM.
What I have tried is to call the function like this:document.getElementById.call(newElement, "id");
and like this: Document.prototype.getElementById.call(newElement, "id");
in both cases the I just get the error Uncaught TypeError: Illegal invocation
Is there a posibility to do that or is it just not possible?
Note: I am trying to solve a JS problem here, thats why I do not want jQuery solutions.