dom icon indicating copy to clipboard operation
dom copied to clipboard

Define mutation events

Open annevk opened this issue 9 years ago • 22 comments
trafficstars

Telemetry from Firefox release builds: 39 0.4% of window/node objects had seen mutation event listener somewhere in them, 47 0.22%.

Chrome:

  • DOMCharacterDataModified: https://www.chromestatus.com/metrics/feature/timeline/popularity/148 0.016%
  • DOMNodeInserted: https://www.chromestatus.com/metrics/feature/timeline/popularity/144 0.6%
  • DOMNodeInsertedIntoDocument: https://www.chromestatus.com/metrics/feature/timeline/popularity/147 0.007%
  • DOMNodeRemoved: https://www.chromestatus.com/metrics/feature/timeline/popularity/145 0.077%
  • DOMNodeRemovedFromDocument: https://www.chromestatus.com/metrics/feature/timeline/popularity/146 0.021%
  • DOMSubtreeModified: https://www.chromestatus.com/metrics/feature/timeline/popularity/143 0.4%

Chrome probably inherits non-support for DOMAttrModified from WebKit: https://bugs.webkit.org/show_bug.cgi?id=8191 (WONTFIX, \o/).

A couple of the Chrome numbers are below the Blink threshold of 0.03%.

@esprehn has mentioned he wanted to change how these events are dispatched in Chrome to offset some of their negative side effects. Is this happening?

According to https://msdn.microsoft.com/en-us/library/dn265032.aspx Internet Explorer does not support *IntoDocument and *FromDocument, but does support DOMAttrModified.

It seems like DOM Standard needs to define

  • DOMNodeInserted
  • DOMNodeRemoved
  • DOMSubtreeModified

at a minimum. "Asynchronous timing" would be great, but we should only specify that if Chrome manages to ship it.

annevk avatar Aug 18 '16 08:08 annevk