Questions tagged [mutation-events]

Mutation Events have been deprecated in favor of Mutation Observers.

Mutation Events provided a way to notify javascript of changes to the DOM. It didn't go so well: http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/0779.html

Mutation Events is not performant, and has many issues. Use instead.

68 questions
0
votes
2 answers

Should DOMNodeInsertedIntoDocument bubble?

I've been always thinking that DOMNodeInsertedIntoDocument/DOMNodeRemovedFromDocument events should not bubble, and for me that made enough sence. However, just recently I looked into specification once again and found out that in one location it…
Sergey Ilinsky
  • 31,255
  • 9
  • 54
  • 56
0
votes
1 answer

removeEventListener not working in IE10, works in Chrome

I am trying to create a mini library using MutationObserver to detect changes in DOM but also to fallback to basic Mutation Events in older browsers. So far so good, it works properly in Chrome and Firefox and I tested the fallback in these browsers…
0
votes
1 answer

DOMNodeInserted is posible to mark added elements?

I'm using DOMNodeInserted MutationEvent, is any way to select only new inserted elements by using this event? I have to add class to all inputs when they are inserted to document. I'm inserting new inputs to form via AJAX request but I can't add it…
LJ Wadowski
  • 6,424
  • 11
  • 43
  • 76
0
votes
2 answers

determine .class name using DOMNodeInserted

If i run this below: $(document).bind('DOMNodeInserted', function(){ $('.new', this).hide(); }); it will run ok and it will hide the .new div. But i need to do something like the below: $(document).bind('DOMNodeInserted', function(){ …
medzi
  • 407
  • 1
  • 8
  • 20
0
votes
1 answer

How to detect DOM mutation in a UIWebview?

Is there a good way to detect changes made by a script to the DOM ? Mutation observers don't seem to be available for Webkit on iOS.
alecail
  • 3,993
  • 4
  • 33
  • 52
0
votes
1 answer

jQuery DOMNodeInserted: Find specific element

I would like to know how I can listen to the DOM when a SPECIFIC element is added, and then act upon it. After the DOM s loaded initially, there is a div(.myElement) that is loaded long afterwards:
. ... ... ... …
DextrousDave
  • 6,603
  • 35
  • 91
  • 134
0
votes
2 answers

DOMNodeInserted in the IE

Why doesn't this code work in IE? Please help fix it: jQuery('body').live('DOMNodeInserted',function(e){ var parent = jQuery(e.target).parent(); parent.find("a").css('color','#AA62C6'); parent.find('a').removeAttr('onmousedown'); });
0
votes
2 answers

chrome ext: limiting DOMNodeInserted

I'm developing a chrome plugin that inject a class to every element in the page. But in pages such as facebook or twitter there is content loaded dynamically, so I use this code to check when this conent is…
slwr
  • 1,105
  • 6
  • 16
  • 35
1 2 3 4
5