All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

All gists matching topic htmx

Recently created
Least recently created
Recently updated
Least recently updated
portalzine's Avatar

portalzine / HTMX - Process on DOM changes

0 likes
0 forks
1 files
Last active 5 months ago
htmx javascript mutationobserver
1 const 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 })
10 observer.observe(document, {childList: true, subtree: true})
Newer Older

Powered by Opengist ⋅ Load: 41ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ Data Privacy