Testing

Mutation Events: Browser Support, Deprecation, Migration

Mutation Events ran in Chrome 15 to 134, Edge 12 to 136, Firefox 6 to 139, and Safari 4 to 18.7, but Chrome 135+, Edge 137+, Firefox 140+, and Safari 26+ removed it. Migrate to MutationObserver.

Author

Prince Dewani

May 1, 2026

Mutation Events is a W3C DOM Level 2 API that fires synchronous events when nodes are inserted, removed, or changed. It works in Chrome through 134, Edge through 136, Firefox through 139, Safari through 18.7, Opera 11.6+, Samsung Internet through 29, and Internet Explorer 9 to 11; Chrome 135+, Edge 137+, Firefox 140+, and Safari 26+ have removed it.

This guide covers what Mutation Events are, the browsers that support them, the event types, deprecation reasons, and migration to MutationObserver.

What are Mutation Events?

Mutation Events is a deprecated DOM Level 2 API that fires synchronous events when DOM nodes are inserted, removed, renamed, or modified. The W3C defined nine event types like DOMNodeInserted, DOMSubtreeModified, and DOMAttrModified, then deprecated the whole API in DOM Level 3 over performance and design problems.

Which browsers support Mutation Events?

Mutation Events once shipped in every major browser but is now disabled or removed across modern releases. Chrome 135+, Edge 137+, Firefox 140+, and Safari 26+ have stripped the API.

Loading browser compatibility data...

Mutation Events compatibility in Chrome

Chrome supports Mutation Events as a partial implementation from Chrome 15 to Chrome 126 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 127 to 134 disabled them behind the MutationEventsEnabled enterprise policy. Chrome 135+ removes them entirely, so DOMNodeInserted listeners fire nothing on a current release.

Mutation Events compatibility in Edge

Microsoft Edge supports Mutation Events as a partial implementation from Edge 12 to Edge 126 on Windows and macOS. Edge 127 to Edge 136 disabled them by default and accepted the MutationEventsEnabled group policy as a temporary opt-in. Edge 137+ removes the events outright and marks the policy itself obsolete.

Mutation Events compatibility in Firefox

Firefox supports Mutation Events as a partial implementation from Firefox 6 to Firefox 139 on Windows, macOS, Linux, and Android. Mozilla kept DOMElementNameChanged and DOMAttributeNameChanged off the public web. Firefox 140+ removes the entire MutationEvent interface from Gecko.

Mutation Events compatibility in Safari

Safari supports Mutation Events as a partial implementation from Safari 4 to Safari 18.7 on macOS and from Safari 4.2 to 18.7 on iOS and iPadOS. Apple never shipped DOMAttrModified in WebKit, so attribute-change listeners always fired nothing on Apple devices. Safari 26+ removes the remaining mutation events on both macOS and iOS.

Mutation Events compatibility in Opera

Opera supported Mutation Events fully from Opera 11.6 to Opera 12.1 on Presto, then partially from Opera 15 to Opera 112 on Chromium. Opera 113+ disabled the events by default in line with upstream Chromium and is on track to remove them. Opera Mini does not expose Mutation Events in any version.

Mutation Events compatibility in Samsung Internet

Samsung Internet supports Mutation Events as a partial implementation from Samsung Internet 4 to Samsung Internet 29 on Galaxy phones and tablets. The browser tracks the Chromium event surface, so Samsung Internet 25+ matches Chrome 127+ behavior. Samsung Internet 30 and later track the upstream removal.

Mutation Events compatibility in Android Browser

The legacy Android Browser supports Mutation Events from Android 2.3 to Android 4.4.4 on the original WebView builds. Chrome for Android 147+ removes the events in line with the desktop Chrome 135+ change, so Mutation Events are effectively gone across the Android platform.

Mutation Events compatibility in Internet Explorer

Internet Explorer 9 to 11 support DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, and DOMCharacterDataModified on Windows 7 and later. Internet Explorer 6 to 8 did not support Mutation Events. Microsoft has retired Internet Explorer, so move listener-based code to Chromium-based Edge or Chrome.

Note

Note: Mutation Events behave differently across browsers and removal versions vary. Test them on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the types of Mutation Events?

The DOM Level 2 spec defines nine mutation events. Six fired across every major engine, while three shipped patchy or only in Firefox.

  • DOMNodeInserted: Fires when a node is added under a parent. Supported across every Mutation Events browser including Internet Explorer 9 to 11.
  • DOMNodeRemoved: Fires before a node is removed from its parent. Same browser support as DOMNodeInserted.
  • DOMSubtreeModified: Fires once after the subtree under the target finishes mutating.
  • DOMNodeInsertedIntoDocument: Fires on every node added inside the document. Does not bubble, supported on Chrome, Edge, Firefox, Safari, Opera, and Samsung Internet.
  • DOMNodeRemovedFromDocument: Fires on every node removed from the document. Same browser support as DOMNodeInsertedIntoDocument.
  • DOMCharacterDataModified: Fires when a Text or CDATASection node value changes.
  • DOMAttrModified: Fires when an attribute is added, removed, or changed. Bubbles on Chrome, Edge, Firefox, Opera, and Samsung Internet; Safari never shipped it.
  • DOMElementNameChanged and DOMAttributeNameChanged: Fire after Document.renameNode renames an element or attribute. Mozilla-only on the public web.

Why are Mutation Events deprecated?

The W3C deprecated Mutation Events in DOM Level 3 because the synchronous design slowed every DOM modification and cross-browser support never converged. Vendors have since disabled or removed the API in favor of MutationObserver.

  • Severe performance penalty: A single listener slows further DOM modifications by 1.5 to 7 times, and the penalty does not reverse when the listener is removed.
  • Synchronous fire on every change: Each event blocks the main thread, so a page that mutates one hundred nodes pays the listener cost on every node.
  • Re-entrancy and crash bugs: Mutating the DOM inside a handler fires more events and can recurse without limit, producing crash and security bugs vendors could not patch cleanly.
  • Patchy cross-browser support: Safari never shipped DOMAttrModified, Firefox kept rename events Mozilla-only, and Internet Explorer 9 to 11 fired only four of the nine events.
  • MutationObserver replaces it: The asynchronous, batched replacement ships across every major browser, so there is no reason to keep Mutation Events alive.
...

How do you migrate from Mutation Events to MutationObserver?

A migration swaps every addEventListener call for a DOM mutation name with a single MutationObserver instance that watches a target subtree.

  • Find every listener: Search the codebase for addEventListener calls with DOMNodeInserted, DOMNodeRemoved, DOMSubtreeModified, DOMCharacterDataModified, and DOMAttrModified, including legacy bundles and third-party libraries.
  • Pick the right target node: Choose the highest-level element whose subtree you need to watch. A whole-document observer is rarely needed and adds callback work.
  • Create a MutationObserver: Pass a callback that receives an array of MutationRecord objects carrying the change type, target, added or removed nodes, and attribute name.
  • Configure observe with the right flags: Call observer.observe(target, options) and set childList, subtree, attributes, attributeOldValue, characterData, and characterDataOldValue to match the old listeners.
  • Move the listener body into the callback: Branch on record.type so the same code runs once per batch instead of once per node.
  • Disconnect when done: Call observer.disconnect() on unmount so the observer does not pin the watched subtree in memory.
  • Verify across browsers: Run the migrated page on Chrome 135+, Edge 137+, Firefox 140+, and Safari 26+, and use TestMu AI to cover older builds that still fire the deprecated events.

Paste this snippet into the DevTools console of any modern browser to watch the same subtree changes the old listeners used to receive.

// Replace a DOMNodeInserted / DOMNodeRemoved listener with a MutationObserver.
const target = document.getElementById("app");

const observer = new MutationObserver((records) => {
  for (const record of records) {
    record.addedNodes.forEach((node) => {
      console.log("Node added under #app:", node);
    });
    record.removedNodes.forEach((node) => {
      console.log("Node removed from #app:", node);
    });
    if (record.type === "attributes") {
      console.log("Attribute changed:", record.attributeName, "on", record.target);
    }
  }
});

observer.observe(target, {
  childList: true,
  subtree: true,
  attributes: true,
  characterData: true,
});

// Stop watching when the page no longer needs the updates.
// observer.disconnect();

What are the known issues with Mutation Events?

Even inside the support windows above, Mutation Events behaved inconsistently. The cross-browser quirks below catch most QA teams off guard.

  • DOMAttrModified missing in WebKit: Safari and iOS Safari never fire DOMAttrModified, so attribute-watching code that worked on Chrome and Firefox silently failed on Apple devices.
  • Rename events fire only in Firefox: DOMElementNameChanged and DOMAttributeNameChanged stayed Mozilla-only, so Document.renameNode notifications dropped silently on Chrome, Edge, Safari, and Opera.
  • Console deprecation warning floods logs: Chrome and Edge print "Use of Mutation Events is deprecated. Use MutationObserver instead." for every listener, drowning real errors when legacy plugins like bxslider trigger it.
  • Chrome 127+ disabled by default flips the contract: A page that worked on Chrome 15 to 126 broke on Chrome 127 to 134 without the MutationEventsEnabled policy. Chrome 135+ removed both the policy and the events.
  • Performance penalty does not reverse: Attaching and removing a listener leaves the document on the slow DOM-modification path until reload.
  • Re-entrancy can recurse without limit: Mutating the DOM inside a DOMSubtreeModified handler fires DOMSubtreeModified again, and a misplaced setAttribute can lock the tab.

In my experience, the issue that bites teams hardest is the silent DOMAttrModified gap on Safari. A feature that watches an aria attribute works in Chrome and Firefox QA, then fires zero events on iPhone Safari users. Run the MutationObserver migration on real iOS Safari before shipping.

...

Citations

All Mutation Events version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests