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

Optimize data-mutation-free for mutation observer #2465

Closed
wants to merge 1 commit into from

Conversation

medzhidov
Copy link

@medzhidov medzhidov commented Sep 2, 2023

Optimization from this issue:
#2205

Copy link
Member

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, implement a test for this case

@bettysteger
Copy link
Contributor

@medzhidov can you write a test for this case? The test could be similar to this one.

@bettysteger
Copy link
Contributor

@medzhidov so this will also resolve PR #2317 ?

@medzhidov
Copy link
Author

@bettysteger Yes, but the solution suggested in #2317 is just another approach. I propose making the data mutation more user-friendly, while in #2317, it is suggested to create a new property for the block instance that will disable any mutations inside it. I believe both solutions are good, but the second one (#2317) is more fundamental because we can manipulate the block from its class instance. "data-mutation-free" is more versatile; it may be needed when we want to "hide" certain parts of our block from the onchange callback, rather than the entire block.

@bettysteger
Copy link
Contributor

@medzhidov thanks for your answer! much appreciated!

I just did the "same" PR, but added a test: #2548

@neSpecc
Copy link
Member

neSpecc commented Jan 10, 2024

Resolved by #2548

@neSpecc neSpecc closed this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants