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

Not all observers will be removed when one call observe with same target node #29814

Open
luckylooke opened this issue Oct 24, 2023 · 1 comment
Labels
Content:WebAPI Web API docs effort: small This task is a small effort. goal: accuracy (Experimental label) Issues about inaccurate/incorrect content. help wanted If you know something about this topic, we would love your help!

Comments

@luckylooke
Copy link
Contributor

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe

What specific section or headline is this issue about?

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe#reusing_mutationobservers

What information was incorrect, unhelpful, or incomplete?

It says:

all existing observers are automatically removed from all targets being observed
it sounds like total disaster, that all observers will be removed, but specification says something much much lighter, that all transient observers will be removed which is much much lower damage
For each node of this’s node list, remove all transient registered observers whose source is registered from node’s registered observer list.

https://dom.spec.whatwg.org/#interface-mutationobserver section with observe() method steps

What did you expect to see?

Something more clear that only transient observers are removed with briefly explanation of what those are.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@luckylooke luckylooke added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Oct 24, 2023
@github-actions github-actions bot added the Content:WebAPI Web API docs label Oct 24, 2023
@caugner caugner added the goal: accuracy (Experimental label) Issues about inaccurate/incorrect content. label Nov 3, 2023
@Rumyra Rumyra added help wanted If you know something about this topic, we would love your help! effort: small This task is a small effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Nov 16, 2023
@senocular
Copy link
Contributor

Noticed this one today. Not sure transient observers need to be covered. I think it just needs to point out that if you observe a target that's already being observed by this observer, the old options will be replaced with the new options for that target. In either case, as far as the user is concerned, all other targets are untouched when observing a new, or existing target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs effort: small This task is a small effort. goal: accuracy (Experimental label) Issues about inaccurate/incorrect content. help wanted If you know something about this topic, we would love your help!
4 participants