Im using the DomNodeInserted event listener (attached to the document) and on each fire of the event I retrieve the added node within the dom using:
event.relatedNode
But when I try to use functions like:
$(event.relatedNode).html($(event.relatedNode).html().replace(/a/g, "i"));
I've also tried the above without the prefixed $ before event.relatedNode but to no avail.
Yet I get this error in IE:
Error: Out of stack space
Source: Microsoft JScript runtime error
These are the elements returned via the events.relatedNode on each fire just FYI:
LOG: [object HTMLBodyElement]
LOG: [object HTMLSpanElement]
LOG: [object HTMLSpanElement]
LOG: [object HTMLSpanElement]
LOG: [object HTMLDivElement]
Any thoughts