1688 shaares
869 private links
869 private links
A clever way to implement a htmx-like mechanism of substituting the content of a node with the response of a request.
It works like this. Have a hidden iframe whose onload callback sets the target node (specified by hash) with the iframe's body content. Then use an a
element to trigger the iframe load: <a target=_the_iframe href="/req-url#target-element">
.
TIL: a[target]
, iframe[hidden]
, contentWindow
, contentDocument
, <base target=X>