observeElement
Callable
Type parameters
- T: Element = Element
Parameters
el: T
The element to observe.
callback: (mutation: MutationRecord, observer: MutationObserver) => void
The function to call when a mutation occurs.
optionaloptions: MutationObserverInit
Optional configuration options for the MutationObserver.
Returns Disconnect
A function that disconnects the observer.
Observes changes to an element and invokes a callback function for each mutation.