@zag-js/mutation-observer
Version:
## Installation
7 lines (4 loc) • 410 B
TypeScript
type ObserveAttributesCallback = (record: MutationRecord) => void;
declare function observeAttributes(node: HTMLElement | null, attributes: string[], fn: ObserveAttributesCallback): (() => void) | undefined;
declare function observeChildren(node: HTMLElement | null, fn: (v: MutationRecord[]) => void): (() => void) | undefined;
export { type ObserveAttributesCallback, observeAttributes, observeChildren };