0

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

Edited by asif49

3
Contributors
2
Replies
14
Views
4 Years
Discussion Span
Last Post by Troy III
0

$(event.relatedNode).html($(event.relatedNode).html().replace(/a/g, "i"));

is it working on other browsers;
d what browser versions have you been testing ?'

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.