Skip to content

Always send previous values through Mutation Observer callbacks #618

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CharlesTaylor7
Copy link
Contributor

@CharlesTaylor7 CharlesTaylor7 commented Apr 18, 2025

This ensures mutation observers always are passing both current and previous values.

That feature was already working for mutation value of "characterData" or "attributes", but now it will handle do this when listening to both via the "anything" keyword.

Relevant docs for the browser API:
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe#parameters

@CharlesTaylor7 CharlesTaylor7 changed the title Patch mutation observer Always send previous values through Mutation Observer callbacks Apr 18, 2025
@1cg
Copy link
Contributor

1cg commented Jun 16, 2025

Hi @CharlesTaylor7 can I ask for a test for this PR?

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

Successfully merging this pull request may close these issues.

2 participants