Liking cljdoc? Tell your friends :D
ClojureScript only.

baredom.components.x-code.x-code

DOM + lifecycle layer for x-code — a code-display component.

The component is stateless: DOM = f(attributes, properties). Source code is read from the element's light-DOM textContent (or the code property / attribute), tokenized by the pure model layer, and rendered escaped into the shadow <code>. A MutationObserver re-renders when the light-DOM text changes. The expand/collapse state lives in the observed expanded attribute, so it too is a value, never a mutable field.

Instance fields hold only the refs map, the cached model, the MutationObserver, and the code property override.

DOM + lifecycle layer for x-code — a code-display component.

The component is stateless: DOM = f(attributes, properties). Source code is
read from the element's light-DOM textContent (or the `code` property /
attribute), tokenized by the pure model layer, and rendered escaped into
the shadow `<code>`. A MutationObserver re-renders when the light-DOM text
changes. The expand/collapse state lives in the observed `expanded`
attribute, so it too is a value, never a mutable field.

Instance fields hold only the refs map, the cached model, the
MutationObserver, and the `code` property override.
raw docstring

init!cljs

(init!)
source

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