You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm still hoping we actually try to get rid of mutation events.
Isn't Firefox still the only browser warn about their use.
(FYI, Firefox telemetry compares Window objects, in which a listener for mutation events was added to either Window or to some Node, to those Window objects where such listeners weren't added.)
SELECT * FROM (
SELECT page, url, REGEXP_EXTRACT(body, r'["\'](DOM(?:CharacterDataModified|Node(?:Inserted|Removed)(?:(?:Into|From)Document)?|SubtreeModified))["\']') AS ev
FROM [httparchive:har.2016_08_01_chrome_requests_bodies]
) WHERE ev != "null"
ORDER BY ev
Once we define these (it seems ever more unlikely we'll be able to remove them), we'll need to make sure to not fire them inside shadow trees. Tracked by https://bugzilla.mozilla.org/show_bug.cgi?id=1489858 for Fx.
Noting for the record that when/if we fix this, we'd need to update HTML (https://www.w3.org/Bugs/Public/show_bug.cgi?id=23036) and UI Events. UI Events currently has a decent amount of spec text around mutation events.
It's worth noting that the removal of mutation events has shipped in Chrome 127 thanks to @mfreed7. While there is an enterprise policy that we expect to support for at least 9 months (and there have been a bunch of bugs that ended with telling folks that they need to use the enterprise policy to keep their apps working until those apps can be fixed), the removal seems so far to be sticking.
Reacted by Domenic Denicola and darien maillet valentine
It's worth noting that the removal of mutation events has shipped in Chrome 127 thanks to @mfreed7. While there is an enterprise policy that we expect to support for at least 9 months (and there have been a bunch of bugs that ended with telling folks that they need to use the enterprise policy to keep their apps working until those apps can be fixed), the removal seems so far to be sticking.
Knock on wood! 😄 But yeah, so far the removal is going cautiously well. It only very recently (last 48 hours) reached 100% of stable users, and it sometimes takes a few days for bugs to trickle back to me. I'll try to check back in here after a few more weeks with a more definitive status update. But assuming that's successful, I'd strongly advocate for this issue being closed as "WontFix". There are also a few mentions of mutation events in the spec (e.g. https://html.spec.whatwg.org/#concept-document-fire-mutation-events-flag) that should likely be deleted.
I have a couple of concerns given the existence of the "reverse origin trial":
It's not transparent which websites continue to be able to use mutation events in Chromium. This makes it much harder for other browsers to remove mutation events before May 2025. E.g., while WebKit in theory could lean on Quirks.cpp without knowledge of what to fill it with it'd turn into a game of whack-a-mole. Also, Chromium has extended those deprecation deadlines in the past (e.g., with locking SharedArrayBuffer behind COOP+COEP, that might still be ongoing?).
This is a very good point. There are some sites using the origin trial, though not a ton. But I agree it might be the best to simply wait for the end of the OT before turning off mutation events in other browsers, to be safe.
I've been very actively trying to manage the usage of mutation events coming up to this removal, and I'll continue to do that afterwards for the origin trial registrants. E.g. I'll be sending reminder emails to all registrants that the OT is coming to a close, and warning that we won't be extending it for anything other than very dire circumstances. But you're right that there's a chance we need to extend the deadline.
Perhaps for now, the answer is "do nothing", and I'll check back in here toward the first quarter of Q1 with an update?
I have a couple of concerns given the existence of the "reverse origin trial":
It's not transparent which websites continue to be able to use mutation events in Chromium. This makes it much harder for other browsers to remove mutation events before May 2025. E.g., while WebKit in theory could lean on Quirks.cpp without knowledge of what to fill it with it'd turn into a game of whack-a-mole. Also, Chromium has extended those deprecation deadlines in the past (e.g., with locking SharedArrayBuffer behind COOP+COEP, that might still be ongoing?).
This is a very good point. There are some sites using the origin trial, though not a ton. But I agree it might be the best to simply wait for the end of the OT before turning off mutation events in other browsers, to be safe.
I just wanted to check back in on this issue. Chromium has now successfully shipped the removal of the Mutation Events (deprecation) Origin Trial, in version 135, which went to stable Chrome this week. And I just landed the code to remove the enterprise policy also. At this point, the feature is disabled for all open web users of Chrome (and I believe Edge). So it should be safe to remove in other browsers now - please let me know if you run into any compat issues, since that would surprise me greatly.
Reacted by sideshowbarker, Simon Pieters, Domenic Denicola and hsinyi
Activity
smaug---- commentedon Aug 23, 2016
I'm still hoping we actually try to get rid of mutation events.
Isn't Firefox still the only browser warn about their use.
(FYI, Firefox telemetry compares Window objects, in which a listener for mutation events was added to either Window or to some Node, to those Window objects where such listeners weren't added.)
foolip commentedon Aug 23, 2016
See also thread in https://lists.w3.org/Archives/Public/www-dom/2016JulSep/thread.html
zcorpan commentedon Aug 24, 2016
20 most commonly used scripts in httparchive that use the strings above (if somebody wants to analyze feasibility of changing timings or so):
Query was
(result of this 88,540 rows, csv is 10.8MB, at https://gist.github.com/zcorpan/6e16e387cfc6cdf377944c7960a02884 )
(result above)
zcorpan commentedon Aug 24, 2016
Usage of each event
annevk commentedon Apr 5, 2017
Latest here is https://lists.w3.org/Archives/Public/www-dom/2017JanMar/0004.html. So Blink still wants to change their behavior.
annevk commentedon Sep 10, 2018
Once we define these (it seems ever more unlikely we'll be able to remove them), we'll need to make sure to not fire them inside shadow trees. Tracked by https://bugzilla.mozilla.org/show_bug.cgi?id=1489858 for Fx.
domenic commentedon Mar 29, 2019
Noting for the record that when/if we fix this, we'd need to update HTML (https://www.w3.org/Bugs/Public/show_bug.cgi?id=23036) and UI Events. UI Events currently has a decent amount of spec text around mutation events.
tkent-google commentedon Apr 5, 2019
Elliot proposed dispatching DOM mutation events on CEReactions timing in 2016. I investigated the feasibility of the proposal.
TL;DR: Not feasible for
DOMNodeRemoved, feasible forDOMNodeRemovedFromDocumentbut it won't have much benefit, and feasible for other events.The details.
dbaron commentedon Jul 31, 2024
It's worth noting that the removal of mutation events has shipped in Chrome 127 thanks to @mfreed7. While there is an enterprise policy that we expect to support for at least 9 months (and there have been a bunch of bugs that ended with telling folks that they need to use the enterprise policy to keep their apps working until those apps can be fixed), the removal seems so far to be sticking.
mfreed7 commentedon Jul 31, 2024
Knock on wood! 😄 But yeah, so far the removal is going cautiously well. It only very recently (last 48 hours) reached 100% of stable users, and it sometimes takes a few days for bugs to trickle back to me. I'll try to check back in here after a few more weeks with a more definitive status update. But assuming that's successful, I'd strongly advocate for this issue being closed as "WontFix". There are also a few mentions of mutation events in the spec (e.g. https://html.spec.whatwg.org/#concept-document-fire-mutation-events-flag) that should likely be deleted.
WebReflection commentedon Jul 31, 2024
mfreed7 commentedon Aug 1, 2024
WebReflection commentedon Aug 1, 2024
8 remaining items
mfreed7 commentedon Aug 23, 2024
This is a very good point. There are some sites using the origin trial, though not a ton. But I agree it might be the best to simply wait for the end of the OT before turning off mutation events in other browsers, to be safe.
I've been very actively trying to manage the usage of mutation events coming up to this removal, and I'll continue to do that afterwards for the origin trial registrants. E.g. I'll be sending reminder emails to all registrants that the OT is coming to a close, and warning that we won't be extending it for anything other than very dire circumstances. But you're right that there's a chance we need to extend the deadline.
Perhaps for now, the answer is "do nothing", and I'll check back in here toward the first quarter of Q1 with an update?
Remove mutation event mentions
domenic commentedon Aug 26, 2024
I merged the HTML PR, but reopening per the latest comment.
It also occurred to me that we should remove https://w3c.github.io/uievents/#legacy-mutationevent-events and other mentions of MutationEvent in that spec. @mfreed7 up for that too?
Remove definitions of MutationEvent and friends
mfreed7 commentedon Aug 26, 2024
Thanks!
w3c/uievents#381
Remove definitions of MutationEvent and friends
Remove mutation event mentions
Remove mutation event mentions
mfreed7 commentedon Apr 4, 2025
I just wanted to check back in on this issue. Chromium has now successfully shipped the removal of the Mutation Events (deprecation) Origin Trial, in version 135, which went to stable Chrome this week. And I just landed the code to remove the enterprise policy also. At this point, the feature is disabled for all open web users of Chrome (and I believe Edge). So it should be safe to remove in other browsers now - please let me know if you run into any compat issues, since that would surprise me greatly.
zcorpan commentedon May 22, 2025
w3c/uievents#381 was merged, the reverse origin trial was removed. I don't see other unaddressed comments, so closing again.
Changes in other browsers:
1jj commentedon Jun 18, 2025
filed an issue against caniuse, maybe someone here knows exact numbers:
Fyrd/caniuse#7336