Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation / Removal of Mutation Events #807

Closed
mfreed7 opened this issue May 25, 2023 · 8 comments
Closed

Deprecation / Removal of Mutation Events #807

mfreed7 opened this issue May 25, 2023 · 8 comments

Comments

@mfreed7
Copy link

mfreed7 commented May 25, 2023

Request for Mozilla Position on an Emerging Web Specification

Other information

I am going to make a push to remove Mutation Events from Chromium. This will not be easy, and success is definitely not guaranteed. The timeline is >= 1 year, if things go well. It's possible we might need to fall back to "delayed" mutation events that run at microtask or CEReactions timing. It's possible we might not be able to remove all of the events.

However, whatever happens, I'm hoping to get the support of Gecko (and WebKit), which will help convince developers who own existing usage to migrate to Mutation Observer. Some ideas, if you're supportive, might include:

  1. Strengthen (as appropriate) the deprecation warnings to Gecko. I've already done this for Chromium, starting in M114.
  2. Plan for a joint, coordinated removal from all browsers at some date/milestone in the future.
  3. Write a co-authored blog post. I'm happy to drive this, but would love feedback, edits, and a Mozilla-owned by-line.
  4. Other suggestions appreciated.
@zcorpan
Copy link
Member

zcorpan commented May 26, 2023

This is great, thanks for driving this! I suggest position positive.

Your ideas sound reasonable to me. Maybe a reverse origin trial could make sense here to allow for a longer grace period where needed.

@smaug----
Copy link
Collaborator

MutationEvents have been deprecated in Gecko since 2012.
We haven't been able to remove them because the usage has been so high, but if now also other browser vendors try to remove them more actively, hopefully we can finally get rid of them.
And the ideas sound very good to me.

Thanks a ton for driving this work!

And yes, very strong positive position.

@mfreed7
Copy link
Author

mfreed7 commented May 26, 2023

This is great, thanks for driving this! I suggest position positive.

Thanks!

Your ideas sound reasonable to me. Maybe a reverse origin trial could make sense here to allow for a longer grace period where needed.

Yep, that's definitely on my list of things to add. I did that with Web Components v0, and it was quite helpful.

MutationEvents have been deprecated in Gecko since 2012. We haven't been able to remove them because the usage has been so high, but if now also other browser vendors try to remove them more actively, hopefully we can finally get rid of them. And the ideas sound very good to me.

Great! I agree the usage is (still) quite high, but let's see what we can do about that.

Thanks a ton for driving this work!
And yes, very strong positive position.

Thanks, much appreciated!

@zcorpan or @smaug----, would one of you be willing to co-author a blog post on this topic, to show joint support? I've got one drafted, and I can share the draft with you for edits and input, if you're interested. It would be published on developer.chrome.com, but we'd show your Mozilla affiliation prominently.

@zcorpan
Copy link
Member

zcorpan commented May 29, 2023

Sure

@mfreed7
Copy link
Author

mfreed7 commented May 30, 2023

very strong positive position

Awesome, thanks! I need to figure out the process for this, and see if I can line up a WebKit person also, so I'll be in touch.

@mfreed7
Copy link
Author

mfreed7 commented May 31, 2023

FYI: Some google apps still use DOM mutation event listeners if running in Firefox. So I'd be really happy if Google would fix them on this occasion.

Thanks for pointing that out! I actually noticed the same thing last week and was talking to someone about that, but I really appreciate the bug link with a lot more context. That'll help me. I'll pick that up and make sure it gets removed ASAP.

@mfreed7
Copy link
Author

mfreed7 commented Sep 1, 2023

FYI: Some google apps still use DOM mutation event listeners if running in Firefox. So I'd be really happy if Google would fix them on this occasion.

Thanks for pointing that out! I actually noticed the same thing last week and was talking to someone about that, but I really appreciate the bug link with a lot more context. That'll help me. I'll pick that up and make sure it gets removed ASAP.

It took some time to verify nothing breaks, but we've landed a change (from this to this) to hard-code USE_MUTATION_EVENTS: false there instead of goog.userAgent.GECKO.

If you notice any other similar things in Google code, please do call them out to me and I'll work on getting them removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants