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

Recommended Answers

Yet I get this error in IE:
Error: Out of stack space
Source: Microsoft JScript runtime error

What version of IE are you using?

Read this

http://support.microsoft.com/kb/976662

and also take a look at this small code snippet (I think not sure (I'm not sure how you …

Jump to Post

All 2 Replies

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.