Liking cljdoc? Tell your friends :D

hyperfiddle.electric-dom3


->textclj

(->text elem)
source

acljmacro

(a & body)
source

abbrcljmacro

(abbr & body)
source

addresscljmacro

(address & body)
source

areacljmacro

(area & body)
source

articlecljmacro

(article & body)
source

asidecljmacro

(aside & body)
source

audiocljmacro

(audio & body)
source

bcljmacro

(b & body)
source

bdicljmacro

(bdi & body)
source

bdocljmacro

(bdo & body)
source

blockquotecljmacro

(blockquote & body)
source

brcljmacro

(br & body)
source

buttoncljmacro

(button & body)
source

canvascljmacro

(canvas & body)
source

citecljmacro

(cite & body)
source

codecljmacro

(code & body)
source

colcljmacro

(col & body)
source

colgroupcljmacro

(colgroup & body)
source

Commentclj

(Comment arg)

Mount a DOM Comment in current node, containing stringified arg. Return arg.

Mount a DOM Comment in current `node`, containing stringified `arg`. Return `arg`.
sourceraw docstring

commentcljmacro

(comment & args)

Mount a DOM Comment in current node for each argument in args. Each Comment node will contain the stringified argument. Return last argument as in do.

Mount a DOM Comment in current `node` for each argument in `args`.
Each Comment node will contain the stringified argument.
Return last argument as in `do`.
sourceraw docstring

datacljmacro

(data & body)
source

datalistcljmacro

(datalist & body)
source

ddcljmacro

(dd & body)

The <dd> HTML element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).

The <dd> HTML element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).
sourceraw docstring

delcljmacro

(del & body)
source

detailscljmacro

(details & body)
source

dfncljmacro

(dfn & body)
source

dialogcljmacro

(dialog & body)
source

divcljmacro

(div & body)
source

dlcljmacro

(dl & body)

The <dl> HTML element represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements). Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).

The <dl> HTML element represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements). Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).
sourceraw docstring

dtcljmacro

(dt & body)

The <dt> HTML element specifies a term in a description or definition list, and as such must be used inside a <dl> element. It is usually followed by a <dd> element; however, multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element.

The <dt> HTML element specifies a term in a description or definition list, and as such must be used inside a <dl> element. It is usually followed by a <dd> element; however, multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element.
sourceraw docstring

elementcljmacro

(element tag & body)

Mount a new DOM Element of type tag in the current node and run body in the context of the new Element.

  (dom/element :div (dom/text "content"))
Mount a new DOM Element of type `tag` in the current `node` and run `body` in
  the context of the new Element.
```clj
  (dom/element :div (dom/text "content"))
```
sourceraw docstring

element*clj

(element* tag forms)
(element* ns tag forms)
source

emcljmacro

(em & body)
source

embedcljmacro

(embed & body)
source

fieldsetcljmacro

(fieldset & body)
source

figurecljmacro

(figure & body)
source

Focused?clj

(Focused?)
(Focused? node)
source

(footer & body)
source

forkclj

(fork flow)
(fork n flow)
source

formcljmacro

(form & body)
source

h1cljmacro

(h1 & body)
source

h2cljmacro

(h2 & body)
source

h3cljmacro

(h3 & body)
source

h4cljmacro

(h4 & body)
source

h5cljmacro

(h5 & body)
source

h6cljmacro

(h6 & body)
source

(header & body)
source

hgroupcljmacro

(hgroup & body)
source

hrcljmacro

(hr & body)
source

icljmacro

(i & body)
source

iframecljmacro

(iframe & body)
source

imgcljmacro

(img & body)
source

inputcljmacro

(input & body)
source

inscljmacro

(ins & body)
source

itempropcljmacro

(itemprop & body)
source

kbdcljmacro

(kbd & body)
source

labelcljmacro

(label & body)
source

legendcljmacro

(legend & body)
source

licljmacro

(li & body)
source

(link & body)
source

maincljmacro

(main & body)
source

markcljmacro

(mark & body)
source

mathcljmacro

(math & body)
source

(menu & body)
source

metercljmacro

(meter & body)
source

mount-itemsclj

source

MouseDown?clj

(MouseDown?)
(MouseDown? node)
source

(nav & body)
source

nodeclj

source

noscriptcljmacro

(noscript & body)
source

objectcljmacro

(object & body)
source

olcljmacro

(ol & body)
source

Onclj

(On event-type)
(On event-type f)
(On event-type f init-v)
(On event-type f init-v opts)
(On node event-type f init-v opts)
source

OnAllclj

(OnAll event-type)
(OnAll event-type f)
(OnAll event-type f opts)
(OnAll event-type f opts concurrency-factor)
(OnAll node event-type f opts concurrency-factor)
source

optgroupcljmacro

(optgroup & body)
source

optioncljmacro

(option & body)
source

outputcljmacro

(output & body)
source

pcljmacro

(p & body)
source

patch-nodelistclj

(patch-nodelist element diff)

Take a DOM element, an incseq's diff and patch the diff over the element's children list (a NodeList), applying additions, replacements, removals and reordering of children. Must be called exactly once per element and exactly once per diff.

Take a DOM `element`, an incseq's `diff` and patch the diff over the element's
children list (a NodeList), applying additions, replacements, removals and reordering of
children. Must be called exactly once per element and exactly once per diff.
sourceraw docstring

perform-additions!clj

(perform-additions! element {:keys [degree grow permutation change]})

Take a DOM element and an incseq's diff. Perform addition of new child elements into element.

Take a DOM `element` and an incseq's diff. Perform addition of new child elements into `element`.
sourceraw docstring

perform-adds-and-replacements!clj

(perform-adds-and-replacements! element diff)

Take a DOM element and an incseq's diff. Perform additions of new child elements and replacement of existing ones. Replacement is not moving, replacement means replace existing children by new children at the same, respective locations.

Take a DOM `element` and an incseq's diff. Perform additions of new child elements and replacement of existing ones.
Replacement is not moving, replacement means replace existing children by new
children at the same, respective locations.
sourceraw docstring

perform-removals!clj

(perform-removals! element {:keys [permutation degree shrink]})

Take a DOM element and an incseq's diff. Must be called after perform-additions!. Will remove all deleted child elements from the element's childlist. Return the remaining permutations map to perform (reorders) after removals.

Take a DOM `element` and an incseq's diff. Must be called after `perform-additions!`.
Will remove all deleted child elements from the `element`'s childlist.
Return the remaining permutations map to perform (reorders) after removals.
sourceraw docstring

perform-removals-and-reorders!clj

(perform-removals-and-reorders! element diff)

Take a DOM element and an incseq's diff. Perform removal of extra (deleted) elements, and reordering of remaining elements. Must be called after perform-adds-and-replacements!.

Take a DOM `element` and an incseq's diff. Perform removal of extra (deleted)
elements, and reordering of remaining elements. Must be called after
`perform-adds-and-replacements!`.
sourceraw docstring

perform-reorders!clj

(perform-reorders! element {:keys []} permutations)

Take a DOM element, an incseq diff and a map of permutations describing how to reorder child elements of element, and perform reordering of those child elements. permutations must be the return value of perform-removals!.

Take a DOM `element`, an incseq `diff` and a map of `permutations` describing
how to reorder child elements of `element`, and perform reordering of those
child elements. `permutations` must be the return value of `perform-removals!`.
sourceraw docstring

perform-replacements!clj

(perform-replacements! element {:keys [permutation]} remaining-changes)

Take a DOM element, an incseq's diff and a map of index -> value representing the remaining changes after additions have been performed (return value of perform-additions!). For each change, will punch new values in, at their respective indices, overwriting existing ones. Replacements are not reorders, see perform-reorders!.

Take a DOM `element`, an incseq's diff and a map of index -> value representing
the remaining changes after additions have been performed (return value of
`perform-additions!`). For each change, will punch new values in, at their
respective indices, overwriting existing ones. Replacements are not reorders,
see `perform-reorders!`.
sourceraw docstring

picturecljmacro

(picture & body)
source

precljmacro

(pre & body)
source

progresscljmacro

(progress & body)
source

propscljmacro

(props attributes)
(props node attributes)

Take a map of HTML attributes to values and reactively sets each of them onto a given DOM node. Default node is the one in scope.

Example:

  (dom/div (dom/props {:id "my-div", :class ["foo"], :style {:background-color :red}}))
  • A value of nil will remove the attribute.
  • Attribute names are case-insensitive, like in HTML.
  • Attribute inherits the node's namespace (e.g. SVG vs HTML attributes)
  • :class, setting the CSS class, can be a string or a collection of strings.
  • :style, setting inline CSS styles, supports setting CSS variables (e.g. {:--my-color :red})
    • for more complex styles (e.g. pseudo-classes, pseudo-elements, keyframes) use Electric-CSS.

Note props will decide if an attribute is set as an HTML attribute or as a DOM object property. For instance:

  • An input's :value is set through the node.value property.
  • :list (input's datalist) can only be set by attribute, as the corresponding property is readonly.
  • :class doesn't set the "class" HTML attribute, but efficiently manipulates the node's .classList property.
  • :style doesn't set the "style" HTML attribute, but efficiently manipulates the CSSStyleDeclaration object under the .style property.
  • etc.
Take a map of HTML attributes to values and reactively sets each of them onto
a given DOM `node`. Default `node` is the one in scope.

Example:
```clj
  (dom/div (dom/props {:id "my-div", :class ["foo"], :style {:background-color :red}}))
```

- A value of `nil` will remove the attribute.
- Attribute names are case-insensitive, like in HTML.
- Attribute inherits the `node`'s namespace (e.g. SVG vs HTML attributes)
- `:class`, setting the CSS class, can be a string or a collection of strings.
- `:style`, setting inline CSS styles, supports setting CSS variables (e.g. {:--my-color :red})
  - for more complex styles (e.g. pseudo-classes, pseudo-elements, keyframes) use Electric-CSS.

Note `props` will decide if an attribute is set as an HTML attribute or as a DOM
object property. For instance:
- An input's `:value` is set through the `node.value` property.
- `:list` (input's datalist) can only be set by attribute, as the corresponding property is readonly.
- `:class` doesn't set the "class" HTML attribute, but efficiently manipulates the node's `.classList` property.
- `:style` doesn't set the "style" HTML attribute, but efficiently manipulates the CSSStyleDeclaration object under the `.style` property.
- etc.
  
sourceraw docstring

qcljmacro

(q & body)
source

rubycljmacro

(ruby & body)
source

scljmacro

(s & body)
source

sampcljmacro

(samp & body)
source

scriptcljmacro

(script & body)
source

sectioncljmacro

(section & body)
source

selectcljmacro

(select & body)
source

slotcljmacro

(slot & body)
source

smallcljmacro

(small & body)
source

spancljmacro

(span & body)
source

strongcljmacro

(strong & body)
source

stylecljmacro

(style & body)
source

subcljmacro

(sub & body)
source

summarycljmacro

(summary & body)
source

supcljmacro

(sup & body)
source

tablecljmacro

(table & body)
source

tbodycljmacro

(tbody & body)
source

tdcljmacro

(td & body)
source

templatecljmacro

(template & body)
source

textcljmacro

(text & args)

Mount a DOM TextNode in current node for each argument in args. Each TextNode will contain the stringified argument. Return last argument as in do.

Mount a DOM TextNode in current `node` for each argument in `args`.
Each TextNode will contain the stringified argument.
Return last argument as in `do`.
sourceraw docstring

Textclj

(Text arg)

Mount a DOM TextNode in current node, containing stringified arg. Return arg.

Mount a DOM TextNode in current `node`, containing stringified `arg`. Return `arg`.
sourceraw docstring

textareacljmacro

(textarea & body)
source

textsclj

(texts coll)
source

thcljmacro

(th & body)
source

theadcljmacro

(thead & body)
source

timecljmacro

(time & body)
source

trcljmacro

(tr & body)
source

ucljmacro

(u & body)
source

ulcljmacro

(ul & body)
source

varcljmacro

(var & body)
source

videocljmacro

(video & body)
source

wbrcljmacro

(wbr & body)
source

Withclj

(With element Body)

Run Body in provided DOM element, attaching and managing children inside it. One would use With instead of WithElement to mount an Electric DOM UI inside an existing DOM Element, typically libraries integration.

Run `Body` in provided DOM `element`, attaching and managing children inside it.
One would use `With` instead of `WithElement` to mount an Electric DOM UI inside
an existing DOM Element, typically libraries integration.
sourceraw docstring

WithElementclj

(WithElement tag Body)
(WithElement ns tag Body)

Mount a new DOM Element of type tag in the current node and run Body in the context of the new Element.

Mount a new DOM Element of type `tag` in the current `node` and run `Body` in
the context of the new Element.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close