HTMZ-snippet

 <script>
 function htmz(frame) {
    setTimeout(() =>
	       document.querySelector(frame.contentWindow.location.hash || null)
	       ?.replaceWith(...frame.contentDocument.body.childNodes));
  }
  </script>
  <iframe hidden name="htmz" onload="window.htmz(this)"></iframe>
Die Syntax ist zT. unklar. Was bedeuten die 3 ...??
Die Installationsanleitung für dieses Mikroframework: „Kopieren Sie einfach das Snippet in Ihre Seite.“

Für einen Link, der den Inhalt von 'logger.js' lädt und damit das Element mit der ID 'content' im DOM ersetzt, sieht das beispielsweise so aus:
  <a href="logger.js#content" target=htmz>Klick mich</a>
Klick mich
div id=content

Link: leanrada.com/htmz
In a nutshell, htmz lets you swap page fragments on request using vanilla HTML.
Imagine clicking a link, but instead of reloading the whole page, it only updates the relevant portion of the page.