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

Add support for custom elements #1202

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
wip
silesky committed Dec 17, 2024
commit 60cdecf82a27952e3d1dc4a35a3333934f8a87be
Original file line number Diff line number Diff line change
@@ -206,7 +206,7 @@ export class MutationObservable {

const shouldDebounceElement = shouldDebounce(element)

const _emitAttributeMutationEventDebounced = shouldDebounceElement
const _emitMaybeDebouncedEvent = shouldDebounceElement
? debounceWithKey(
emit,
// debounce based on the attribute names, so that we can debounce all changes to a single attribute. e.g if attribute "value" changes, that gets debounced, but if another attribute changes, that gets debounced separately
@@ -267,7 +267,7 @@ export class MutationObservable {
...mutations,
})

_emitAttributeMutationEventDebounced(mutations)
_emitMaybeDebouncedEvent(mutations)
}

const observer = new MutationObserver(cb)