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

refactor: use slotchange event instead of MutationObserver when possible #9316

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented May 10, 2024

Replaces MutationObserver + childList: true usage with slotchange event for simplification and performance reasons (slots already leverage mutation observer). Another benefit is that using slotchange eliminates conditions where callbacks may be invoked before the element has rendered.

@jcfranco jcfranco requested a review from a team as a code owner May 10, 2024 22:56
@github-actions github-actions bot added the refactor Issues tied to code that needs to be significantly reworked. label May 10, 2024
@jcfranco jcfranco marked this pull request as draft May 10, 2024 22:57
@jcfranco jcfranco changed the title refactor: use slotchange event instead of MutationObserver refactor: use slotchange event instead of MutationObserver when possible May 10, 2024
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues tied to code that needs to be significantly reworked. Stale Issues or pull requests that have not had recent activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant