useMutationObserver API
API reference for the useMutationObserver composable.
Functions
useMutationObserver
(target: MaybeRef<Element>, callback: (entries: MutationObserverRecord[]) => void, options?: UseMutationObserverOptions) => UseMutationObserverReturnA composable that uses the Mutation Observer API to detect changes in the DOM.
Options
immediate
booleanonce
booleanchildList
booleanattributes
booleancharacterData
booleansubtree
booleanattributeOldValue
booleancharacterDataOldValue
booleanattributeFilter
string[]Properties
isActive
Readonly<Ref<boolean, boolean>>Whether the observer is currently active (created and observing)