useMutationObserver API
API reference for the useMutationObserver composable.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| useMutationObserver | System |
| useResizeObserver | System |
| useIntersectionObserver | System |
Functions
useMutationObserver
(target: MaybeElementRef, callback: (entries: MutationObserverRecord[]) => void, options?: UseMutationObserverOptions) => UseMutationObserverReturnA composable that uses the Mutation Observer API to detect changes in the DOM.
Options
immediate
boolean | undefinedonce
boolean | undefinedchildList
boolean | undefinedattributes
boolean | undefinedcharacterData
boolean | undefinedsubtree
boolean | undefinedattributeOldValue
boolean | undefinedcharacterDataOldValue
boolean | undefinedattributeFilter
string[] | undefinedProperties
isActive
Readonly<Ref<boolean, boolean>>Whether the observer is currently active (created and observing)