Liking cljdoc? Tell your friends :D

domo.core


add-class!cljs

(add-class! el & xs)
source

add-event-listener!cljs

(add-event-listener! el nm f opts)
source

arrow-keycode?cljs

(arrow-keycode? e)
source

as-css-custom-property-namecljs

(as-css-custom-property-name v)
source

as-strcljs

(as-str x)
source

attribute-true?cljs

(attribute-true? node attr)
source

cetcljs

(cet e)
source

cetvcljs

(cetv e)
source

click!cljs

(click! el)
source

click-xycljs

(click-xy e)
source

client-rectcljs

(client-rect el)
source

computed-stylecljs

(computed-style nm)
(computed-style el nm)
source

copy-to-clipboard!cljs

(copy-to-clipboard! s)
(copy-to-clipboard! node s)
source

css-custom-property-valuecljs

(css-custom-property-value nm)
(css-custom-property-value el nm)

Gets computed style for css custom property. First checks for the computed sytle on the element, if supplied. If element is not supplied, checks for the computed style on the root html. Returns a string.

Gets computed style for css custom property.
First checks for the computed sytle on the element, if supplied.
If element is not supplied, checks for the computed style on the root html.
Returns a string.
sourceraw docstring

css-custom-property-value-datacljs

(css-custom-property-value-data nm)
(css-custom-property-value-data el nm)

Gets computed style for css custom property. First checks for the computed style on the element, if supplied. If element is not supplied, checks for the computed style on the root html. Returns a map of values.

Gets computed style for css custom property.
First checks for the computed style on the element, if supplied.
If element is not supplied, checks for the computed style on the root html.
Returns a map of values.
sourceraw docstring

css-style-stringcljs

(css-style-string m)
source

data-attrcljs

(data-attr el nm)
source

data-selector=cljs

(data-selector= attr v)
source

dev-onlycljs

(dev-only x)
source

dispatch-event!cljs

(dispatch-event! el e)
source

duration-property-mscljs

(duration-property-ms el property)
source

el-by-idcljs

(el-by-id id)
source

el-from-pointcljs

(el-from-point x y)
source

el-idxcljs

(el-idx el)

Get index of element, relative to its parent

Get index of element, relative to its parent
sourceraw docstring

el-typecljs

(el-type el)
source

etcljs

(et e)
source

etvcljs

(etv e)
source

etv->floatcljs

(etv->float e)
source

etv->intcljs

(etv->int e)
source

focus!cljs

(focus! el)
source

get-first-onscreen-child-from-topcljs

(get-first-onscreen-child-from-top el)
source

grandparentcljs

(grandparent node)
source

has-attribute?cljs

(has-attribute? el x)
source

has-classcljs

(has-class node classname)
source

has-class?cljs

(has-class? el s)
source

hover-class-attrscljs

(hover-class-attrs s)
source

matches-media?cljs

(matches-media? prop val)
source

matches-or-nearest-ancestor?cljs

(matches-or-nearest-ancestor? el sel)
source

media-supports-hover?cljs

(media-supports-hover?)
source

media-supports-touch?cljs

(media-supports-touch?)
source

mouse-down-a11ycljs

(mouse-down-a11y f & args)

Sets up a partial attributes map for using on-mouse-down instead of on-click. Intended for buttons, switches, checkboxes, radios, etc.

The function passed in may accept any number of args, but the last arg needs to be the event.

Contrived example with reagent:

(defn sidenav-item-handler [label modal? e] (domo/scroll-into-view! (domo/qs-data= "foo-bar" label)) (domo/scroll-by! {:y -50}) (when modal? (dismiss-popover! e)))

(defn my-reagent-component [{:keys [coll modal?]}] (into [:ul] (for [{:keys [label]} coll] [:li [button (merge-attrs (sx :.pill ...) (mouse-down-a11y sidenav-item-handler label modal?)) label]])))

Sets up a partial attributes map for using `on-mouse-down` instead of `on-click`.
 Intended for buttons, switches, checkboxes, radios, etc.

 The function passed in may accept any number of args, but the last arg needs 
 to be the event.

 Contrived example with reagent:

(defn sidenav-item-handler [label modal? e]
  (domo/scroll-into-view!
  (domo/qs-data= "foo-bar" label))
  (domo/scroll-by! {:y -50})
  (when modal?
    (dismiss-popover! e)))
 
(defn my-reagent-component
  [{:keys [coll modal?]}]
  (into [:ul]
        (for [{:keys [label]} coll]
          [:li 
          [button
            (merge-attrs
            (sx :.pill
                ...)
            (mouse-down-a11y sidenav-item-handler label modal?))
            label]])))
sourceraw docstring

mouse-event!cljs

(mouse-event! nm)
(mouse-event! nm opts)
source

nearest-ancestorcljs

(nearest-ancestor node sel)
source

next-element-siblingcljs

(next-element-sibling node)
source

node-is-of-type?cljs

(node-is-of-type? el s)
source

observe-intersectioncljs

(observe-intersection {:keys [element intersecting not-intersecting f threshold
                              root-margin]
                       :or {threshold 0.1 root-margin "0px"}})
source

on-key-down-tab-navigationcljs

(on-key-down-tab-navigation e)

If arrow keys are pressed when an element is focused, this will properly handle tab navigation. The element which has focus, and all of its siblings elements, must have a role of tab. All the siblings must be direct children of an element with a role of tablist.

If arrow keys are pressed when an element is focused, this will properly
handle tab navigation. The element which has focus, and all of its siblings
elements, must have a `role` of `tab`. All the siblings must be direct
children of an element with a `role` of `tablist`. 
sourceraw docstring

parentcljs

(parent node)
source

prefers-reduced-motion?cljs

(prefers-reduced-motion?)
source

prevent-default!cljs

(prevent-default! e)
source

previous-element-siblingcljs

(previous-element-sibling node)
source

qscljs

(qs s)
(qs el s)
source

qs-data=cljs

(qs-data= attr v)
(qs-data= el attr v)
source

rafcljs

(raf f)

Sugar for (js/requestAnimationFrame f)

Sugar for (js/requestAnimationFrame f)
sourceraw docstring

remove-attribute!cljs

(remove-attribute! el attr)
source

remove-class!cljs

(remove-class! el & xs)
source

round-by-dprcljs

(round-by-dpr n)
source

screen-quadrantcljs

(screen-quadrant node)

Pass a dom node and get a tuple back reprenting the quadrant in which the center of the node lives. (screen-quadrant (js/document.getElementById "my-id")) => [:top :left]

Pass a dom node and get a tuple back reprenting the quadrant in which the center of the node lives.
(screen-quadrant (js/document.getElementById "my-id")) => [:top :left]
sourceraw docstring

screen-quadrant-from-pointcljs

(screen-quadrant-from-point x y)

Pass an x and y val and get a tuple back reprenting the quadrant in which the point lives. (screen-quadrant 10 20) => [:top :left]

Pass an x and y val and get a tuple back reprenting the quadrant in which the point lives.
(screen-quadrant 10 20) => [:top :left]
sourceraw docstring

scroll-by!cljs

(scroll-by! {:keys [x y behavior] :or {x 0 y 0 behavior "auto"}})
source

scroll-into-view!cljs

(scroll-into-view! el)
(scroll-into-view! el
                   {:keys [inline block behavior]
                    :or {block "start" inline "nearest" behavior "auto"}})
source

scroll-to-top!cljs

(scroll-to-top!)
source

set!cljs

(set! el attr v)
source

set-attribute!cljs

(set-attribute! el attr v)
source

set-caret!cljs

(set-caret! el i)
source

set-client-wh-css-vars!cljs

(set-client-wh-css-vars! el)
source

set-css-var!cljs

(set-css-var! el prop val)
source

set-neg-client-wh-css-vars!cljs

(set-neg-client-wh-css-vars! el)
source

set-property!cljs

(set-property! el attr v)
source

set-style!cljs

(set-style! el prop s)
source

set-style!*cljs

(set-style!* el prop s)
source

toggle-attributecljs

(toggle-attribute node attr a b)
source

toggle-attribute-siblingcljs

(toggle-attribute-sibling el attr a b)
source

toggle-boolean-attributecljs

(toggle-boolean-attribute node attr)
source

toggle-boolean-attribute-siblingcljs

(toggle-boolean-attribute-sibling el attr)
source

toggle-class!cljs

(toggle-class! el & xs)
source

value-selector=cljs

(value-selector= v)
source

viewportcljs

(viewport)
source

writing-directioncljs

(writing-direction)
source

zip-getcljs

(zip-get el steps)
source

zip-navcljs

source

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

× close