I\'m looking for a way to find if element referenced in javascript has been inserted in the document.
Lets illustrate a case with following code:
v
Do this:
var elem = document.createElement('div'); elem.setAttribute('id', 'my_new_div'); if (document.getElementById('my_new_div')) { } //element exists in the document.