Hiccup helpers. They return plain vectors and maps, so this namespace does not need Hiccup itself. When Hiccup 2 is on the classpath, inline script code is wrapped with hiccup.util/raw-string so it is not escaped twice.
Hiccup helpers. They return plain vectors and maps, so this namespace does not need Hiccup itself. When Hiccup 2 is on the classpath, inline script code is wrapped with hiccup.util/raw-string so it is not escaped twice.
Same as privatus.analytics/click-attr: {:data-privatus-click name}, or {}.
Same as privatus.analytics/click-attr: {:data-privatus-click name}, or {}.
Same as privatus.analytics/event-attrs: an attribute map for a custom event.
[:button (event-attrs "Report exported" {:format "csv"}) "Export"]
Same as privatus.analytics/event-attrs: an attribute map for a custom event.
[:button (event-attrs "Report exported" {:format "csv"}) "Export"](rum-tag config)(rum-tag config overrides)Like tag, for Rum (used by Biff). Inline code goes in :dangerouslySetInnerHTML, because Rum escapes plain strings.
Like tag, for Rum (used by Biff). Inline code goes in :dangerouslySetInnerHTML, because Rum escapes plain strings.
(tag config)(tag config overrides)The tag as a seq of Hiccup elements, or nil when nothing should print. When the tag is off and :queue-stub is on, only the queue stub element. Put it in the head; Hiccup expands the seq:
[:head [:title "My app"] (privatus.analytics.hiccup/tag config {:request request})]
Takes the same config and overrides as privatus.analytics/tag.
The tag as a seq of Hiccup elements, or nil when nothing should print.
When the tag is off and :queue-stub is on, only the queue stub element.
Put it in the head; Hiccup expands the seq:
[:head [:title "My app"] (privatus.analytics.hiccup/tag config {:request request})]
Takes the same config and overrides as privatus.analytics/tag.(with-click element click-map-name)Adds a click map name to a Hiccup element:
(with-click [:a {:href "/pricing"} "See plans"] "pricing.cta")
Adds a click map name to a Hiccup element:
(with-click [:a {:href "/pricing"} "See plans"] "pricing.cta")(with-event element event-name)(with-event element event-name props)Adds custom event attributes to a Hiccup element:
(with-event [:button {:class "btn"} "Export"] "Report exported" {:format "csv"})
Adds custom event attributes to a Hiccup element:
(with-event [:button {:class "btn"} "Export"] "Report exported" {:format "csv"})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |