Node Mutation Hook Library

A small wrapper around MutationObserver to hook into creation of elements (filtered on CSS selector) or removal of nodes.

These are versions of this script where the code was updated. Show all versions.

  • v2.1.0 16.02.2026
    • Added a function for hooking into removal too
  • v2.0.0 12.02.2026

    Allow multiple elements with the same selector. Disconnect the observer to stop hooking into new elements created with the selector.

  • v1.0.0 06.02.2026