Liking cljdoc? Tell your friends :D

baredom.dev.pick

Pointing at elements from a REPL, in both directions. pick! puts the page into select mode and answers with a stable, readable id for whatever is clicked. show! takes an id and outlines where it is. element-for turns an id back into an element.

The id is minted here rather than reused from x-trace-history's component id, which is an integer assigned inside the trace hook and only exists while the recorder is installed. Picking has to work with tracing off.

Dev-only. Nothing here is reachable from a component.

Pointing at elements from a REPL, in both directions. `pick!` puts the page into select mode and
answers with a stable, readable id for whatever is clicked. `show!` takes an id and outlines
where it is. `element-for` turns an id back into an element.

The id is minted here rather than reused from x-trace-history's component id, which is an
integer assigned inside the trace hook and only exists while the recorder is installed. Picking
has to work with tracing off.

Dev-only. Nothing here is reachable from a component.
raw docstring

cancel!cljs

(cancel!)

Leave select mode without picking anything.

Leave select mode without picking anything.
sourceraw docstring

element-forcljs

(element-for id)

The element carrying id, or nil for an unknown or nil id. Resolves fresh on every call, so a held result goes stale.

The element carrying `id`, or nil for an unknown or nil id. Resolves fresh on every call, so a
held result goes stale.
sourceraw docstring

hide!cljs

(hide!)

Take the outline off, and stop watching for the scroll that would strand it.

Take the outline off, and stop watching for the scroll that would strand it.
sourceraw docstring

id-ofcljs

(id-of el)

The id of el. The first time any element of its tag is asked for, every one then on the page is numbered in document order.

The id of `el`. The first time any element of its tag is asked for, every one then on the page
is numbered in document order.
sourceraw docstring

pick!cljs

(pick!)

Enter select mode and answer with the id of the next element clicked. Returns a promise, and records the id so picked can read it afterwards. The click is swallowed, so selecting a button does not also press it. A second call abandons the first, whose promise never settles.

Enter select mode and answer with the id of the next element clicked. Returns a promise, and
records the id so `picked` can read it afterwards. The click is swallowed, so selecting a
button does not also press it. A second call abandons the first, whose promise never settles.
sourceraw docstring

pickedcljs

(picked)

The id picked most recently, for reading after the click at a REPL. Nil while a pick is waiting for its click, so an early call says nothing rather than repeating the last answer.

The id picked most recently, for reading after the click at a REPL. Nil while a pick is waiting
for its click, so an early call says nothing rather than repeating the last answer.
sourceraw docstring

show!cljs

(show! id)

Outline the element id names, scrolling it into view when it is off screen. The outline goes away on the next scroll or resize rather than following the element. Returns the id, or nil when the id resolves to nothing.

Outline the element `id` names, scrolling it into view when it is off screen. The outline goes
away on the next scroll or resize rather than following the element. Returns the id, or nil
when the id resolves to nothing.
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