Last active 6 months ago

Revision 208ee0a1775b5e763f11896c4bb1b25403d7ec81

htmx-mutationobserver.js Raw
1const observer = new MutationObserver((mutations) => {
2 mutations.forEach((mutation) => {
3 mutation.addedNodes.forEach((node) => {
4 if (node.nodeType === 1 && !node["htmx-internal-data"]) {
5 htmx.process(node)
6 }
7 })
8 })
9})
10observer.observe(document, {childList: true, subtree: true})
11