Ko***********@gmail.com wrote:
Hi,
I've got several places on page where I'm using the following method
document.createElement to create a new element.
Is there an event that I can attach to which is fired every time a new
node/element added to the DOM using this method.
If *you* are using document.createElement (and not some subnatural
force :-) then what prevents you to call the necessary function?
Also note that createElement doesn't add an element to the DOM. It
*creates* an element you can add later to the DOM using say appendChild
method.
....
var obj = document.createElement('DIV');
....
notifyListener(document.body.appendChild(obj));
....
function notifyListener(obj) {
// do what you want
}
If there is some extra specifics in your situation then please explain
it.