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
1
vote
1 answer

Is it possible to send javascript code to a user's browser securely?

Is it possible to send javascript code to a client, and have it send back information to a server, without the user being able to intercept it, see it, or alter it. As far as I know this is not possible, but I am unsure about certain realtime…
1
vote
1 answer

DOMNodeInserted event loop

I am developing a chrome extension (my fourth question or so...) for facebook, which adds a custom button beside the "like" button. Since posts are added automatically to the news feed without a page refresh, I have to add the script every time new…
Nadav S.
  • 2,429
  • 2
  • 24
  • 38
1
vote
1 answer

Firefox : DOM Mutation Events for disconnected nodes?

I have a few questions (I am interested in answers related to Firefox, but answers in context of other browser might be acceptable too). Do DOM Mutation events get fired for nodes disconnected from the main document, i.e. are disconnected? As per…
Sunil Agrawal
  • 679
  • 4
  • 14
0
votes
4 answers

testing event sequence using jquery

Hi I am trying to see what events get triggered as suggested at the following link. However, I don't see the alerts.. what is wrong here?
Kiran
  • 5,478
  • 13
  • 56
  • 84
0
votes
1 answer

checking abnormal dom modification

How do we distinguish normal DOM modification(by web page itself) and abnormal DOM modification(by attacker)? I found no way in mutation event of javascript. Is it possible?
kwangbul
  • 41
  • 1
  • 4
0
votes
1 answer

DOMAttrModified visual attributes

I have DOMAttrModified working on webkit with some patches and I was wondering changing of what kind of attributes will trigger this event? For example, it does not trigger when I change innerHTML. And is there an easy way for me to know which of…
zpavlinovic
  • 1,507
  • 1
  • 17
  • 36
0
votes
0 answers

jQuery TE .Bind on a Button causes [Violation] Added synchronous DOM mutation listener

I'm working on an old project that uses jQuery-TE 1.4.0 the browser screams this error -> Added synchronous DOM mutation listener to a 'DOMSubtreeModified' event. Consider using MutationObserver to make the page more responsive. Added synchronous…
demo7up
  • 530
  • 5
  • 27
0
votes
1 answer

MutationObserver to detect change in null child element

I have an iframe that is rendering content from another domain. Obviously I cannot access the contentDocument from the other domain (returns null). But when a user performs an action on the rendered iframe, it redirects back to my domain. So at that…
B. Bulpett
  • 814
  • 12
  • 27
0
votes
2 answers

Circumvent the DOMNodeInsertedIntoDocument event

Assume I have a javascript function createMyElement which returns a node that can be inserted into an HTML document. In order to function properly, the code of the node created by createMyElement has to listen for events on the global document at…
Marc
  • 4,327
  • 4
  • 30
  • 46
0
votes
1 answer

before domnodeinserted - javascript

is it possible to launch an event before the node is inserted? I know that "domnodeinserted" works in gecko based browsers but I that code is executed after the node is inserted. I actually want to execute a code before the node is inserted. Thanks…
Shaokan
  • 7,438
  • 15
  • 56
  • 80
0
votes
2 answers

Mutation events in Javascript not working

I'm trying to listen for changes in a XML structure using Javascript. I've got the following code: var doc = document.implementation.createDocument("", "root", null); doc.addEventListener("DOMNodeInserted", function(event) { …
lucas clemente
  • 6,255
  • 8
  • 41
  • 61
0
votes
2 answers

What's the best way to be notified when an extension's toolbaritem is being used?

I want to setup label attributes, and event listeners for a toolbaritem when it's being used. Because even though I add my extension's toolbaritem to it is not found by document.getElementById unless it is…
erikvold
  • 15,988
  • 11
  • 54
  • 98
0
votes
1 answer

How to get the changed content in the page?

I wrote a user script for the latest Chrome browser. It seems the script can't get the changed content of the page after loaded (for example, after the page loaded, I clicked ¿sth? and an embedded window popped up). Even if I used…
Thomson
  • 20,586
  • 28
  • 90
  • 134
0
votes
1 answer

Changing element's HTML before it's inserted in the DOM

Is it possible to change an element's inner HTML before it is inserted in the DOM? I already tried doing this with MutationObserver but the problem is that you can see the element's HTML visually changing, is there a way to do this before DOM…
Youssef
  • 1,033
  • 8
  • 16
0
votes
2 answers

How to delete mutation record objects in javascript

I'm observing changes on a Div element, that is being filled with child div's with ajax calls. My aim is to make some checks within the observed Record objects and filter some of them. How can i delete/remove/filter these mutation records from the…