Liking cljdoc? Tell your friends :D

wagoe.shared.ui.core.htmx

htmx helpers for Hiccup.

htmx helpers for Hiccup.
raw docstring

fragment-request?clj

(fragment-request? headers target-ids)

Whether a request is an htmx control asking for one of target-ids, so a handler serving the page and its fragment from one URL answers with the fragment. A history restore asks for the page. Such a handler sends Vary: HX-Request, HX-Target, so a cache does not answer one with the other.

Whether a request is an htmx control asking for one of `target-ids`, so a
handler serving the page and its fragment from one URL answers with the
fragment. A history restore asks for the page. Such a handler sends
`Vary: HX-Request, HX-Target`, so a cache does not answer one with the other.
sourceraw docstring

merge-attrsclj

(merge-attrs [tag & more] attrs)

element with attrs merged over its attribute map (one is added when it has none).

`element` with `attrs` merged over its attribute map (one is added when it
has none).
sourceraw docstring

oobclj

(oob element)

Mark a Hiccup element for an out-of-band swap: htmx swaps it into the element with the same id, wherever that is on the page. An explicit :hx-swap-oob (e.g. "beforeend:#toasts") is kept. A seq (from for) marks each element; strings and nil pass through.

Mark a Hiccup element for an out-of-band swap: htmx swaps it into the
element with the same id, wherever that is on the page. An explicit
`:hx-swap-oob` (e.g. "beforeend:#toasts") is kept. A seq (from `for`)
marks each element; strings and nil pass through.
sourceraw docstring

varyclj

The Vary header value of a response serving a page and its fragment from one URL; see fragment-request?.

The Vary header value of a response serving a page and its fragment from
one URL; see `fragment-request?`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close