pota/use/mutation

pota/use/mutation wraps MutationObserver behind the same use* / on* pair as the other emitter modules, plus a mutated ref factory you attach with use:ref.

Exports

Notes

Default init is { childList: true, subtree: true }. Pass your own to narrow the scope (attribute changes only, character data, a specific attribute filter, etc.). Multiple subscribers on the same node share one observer, so init from later calls is ignored — the first subscriber wins. The observer disconnects once the last subscriber's scope disposes.