Liking cljdoc? Tell your friends :D

reacl.dom

clj

Supporting macros for Reacl's DOM library .

Supporting macros for Reacl's DOM library   .
cljs

Convenience API for constructing virtual DOM.

This has ClojureScript wrappers for the various HTML elements.

These all expect attributes as a ClojureScript map.

Moreover, sub-element sequences need to be ClojureScript sequences of objects constructed using `keyed-dom'.

Moreover, the `letdom' form constructing virtual DOM elements for easy reference in an event handler.

Convenience API for constructing virtual DOM.

This has ClojureScript wrappers for the various HTML elements.

These all expect attributes as a ClojureScript map.

Moreover, sub-element sequences need to be ClojureScript sequences of
objects constructed using `keyed-dom'.

Moreover, the `letdom' form constructing virtual DOM elements for
easy reference in an event handler.
raw docstring

acljs

source

abbrcljs

source

addresscljs

source

areacljs

source

articlecljs

source

asidecljs

source

audiocljs

source

bcljs

source

basecljs

source

bdicljs

source

bdocljs

source

bigcljs

source

blockquotecljs

source

bodycljs

source

brcljs

source

buttoncljs

source

camelizecljs

(camelize s)

Camelcases a hyphenated string, for example:

(camelize "background-color") < "backgroundColor"

Camelcases a hyphenated string, for example:
> (camelize "background-color")
< "backgroundColor"
sourceraw docstring

camelize-style-namecljs

(camelize-style-name s)

Camelcases a hyphenated CSS property name, for example:

(camelize-style-name "background-color") < "backgroundColor" (camelize-style-name "-moz-transition") < "MozTransition" (camelize-style-name "-ms-transition") < "msTransition"

As Andi Smith suggests (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an -ms prefix is converted to lowercase ms.

Camelcases a hyphenated CSS property name, for example:
> (camelize-style-name "background-color")
< "backgroundColor"
> (camelize-style-name "-moz-transition")
< "MozTransition"
> (camelize-style-name "-ms-transition")
< "msTransition"

As Andi Smith suggests
(http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
is converted to lowercase `ms`.
sourceraw docstring

canvascljs

source

captioncljs

source

circlecljs

source

citecljs

source

codecljs

source

colcljs

source

colgroupcljs

source

datacljs

source

datalistcljs

source

ddcljs

source

delcljs

source

detailscljs

source

dfncljs

source

divcljs

source

dlcljs

source

dom-nodecljs

(dom-node this binding)

Get the real DOM node associated with a binding.

Needs the component object.

Get the real DOM node associated with a binding.

Needs the component object.
sourceraw docstring

dtcljs

source

ellipsecljs

source

emcljs

source

embedcljs

source

fieldsetcljs

source

figcaptioncljs

source

figurecljs

source

source

formcljs

source

h1cljs

source

h2cljs

source

h3cljs

source

h4cljs

source

h5cljs

source

h6cljs

source

HasDomcljsprotocol

General protocol for objects that contain or map to a virtual DOM object.

This is needed for letdom, which wraps the DOM nodes on its right-hand sides.

General protocol for objects that contain or map to a virtual DOM object.

This is needed for [[letdom]], which wraps the DOM nodes on its
right-hand sides.

-get-domcljs

(-get-dom thing)
sourceraw docstring

source

source

hrcljs

source

htmlcljs

source

icljs

source

iframecljs

source

imgcljs

source

inputcljs

source

inscljs

source

kbdcljs

source

keyedcljs

(keyed key dom)

Associate a key with a virtual DOM node.

Associate a key with a virtual DOM node.
sourceraw docstring

keygencljs

source

labelcljs

source

legendcljs

source

letdomclj/smacro

(letdom clauses body0 & bodies)

Bind DOM nodes to names for use in event handlers.

This should be used together with reacl.core/class or reacl.core/defclass.

Its syntax is like let, but all right-hand sides must evaluate to virtual DOM nodes - typically input elements.

The objects can be used with the dom-node function, which returns the corresponding real DOM node.

Example:

(reacl.core/defclass search-bar
  app-state [filter-text in-stock-only on-user-input]
  render
  (fn [& {:keys [dom-node]}]
    (dom/letdom
     [textbox (dom/input
               {:type "text"
                :placeholder "Search..."
                :value filter-text
                :onChange (fn [e]
                            (on-user-input
                             (.-value (dom-node textbox))
                             (.-checked (dom-node checkbox))))})
      checkbox (dom/input
                {:type "checkbox"
                 :value in-stock-only
                 :onChange (fn [e]
                             (on-user-input
                              (.-value (dom-node textbox))
                              (.-checked (dom-node checkbox))))})]
     (dom/form
      textbox
      (dom/p
       checkbox
       "Only show products in stock")))))

Note that the resulting DOM-node objects need to be used together with the other DOM wrappers in reacl.dom.

Bind DOM nodes to names for use in event handlers.

This should be used together with [[reacl.core/class]] or [[reacl.core/defclass]].

Its syntax is like `let`, but all right-hand sides must evaluate to
virtual DOM nodes - typically input elements.

The objects can be used with the [[dom-node]] function,
which returns the corresponding real DOM node.

Example:

    (reacl.core/defclass search-bar
      app-state [filter-text in-stock-only on-user-input]
      render
      (fn [& {:keys [dom-node]}]
        (dom/letdom
         [textbox (dom/input
                   {:type "text"
                    :placeholder "Search..."
                    :value filter-text
                    :onChange (fn [e]
                                (on-user-input
                                 (.-value (dom-node textbox))
                                 (.-checked (dom-node checkbox))))})
          checkbox (dom/input
                    {:type "checkbox"
                     :value in-stock-only
                     :onChange (fn [e]
                                 (on-user-input
                                  (.-value (dom-node textbox))
                                  (.-checked (dom-node checkbox))))})]
         (dom/form
          textbox
          (dom/p
           checkbox
           "Only show products in stock")))))

Note that the resulting DOM-node objects need to be used together
with the other DOM wrappers in `reacl.dom`.
sourceraw docstring

licljs

source

linecljs

source

source

maincljs

source

make-dom-bindingcljs

(make-dom-binding n literally?)

Make an empty DOM binding from a ref name.

If literally? is not true, gensym the name.

Make an empty DOM binding from a ref name.

If `literally?` is not true, gensym the name.
sourceraw docstring

mapcljs

source

markcljs

source

source

source

metacljs

source

metercljs

source

source

noscriptcljs

source

objectcljs

source

olcljs

source

optgroupcljs

source

optioncljs

source

outputcljs

source

pcljs

source

paramcljs

source

pathcljs

source

polygoncljs

source

polylinecljs

source

precljs

source

progresscljs

source

qcljs

source

reacl->react-attribute-namescljs

source

reacl->react-style-namecljs

(reacl->react-style-name reacl-name)

Convert Reacl style name (keyword) to React name (string).

Convert Reacl style name (keyword) to React name (string).
sourceraw docstring

reacl->style-namescljs

Cache for style names encountered.

Cache for style names encountered.
sourceraw docstring

rectcljs

source

rpcljs

source

rtcljs

source

rubycljs

source

scljs

source

sampcljs

source

scriptcljs

source

sectioncljs

source

selectcljs

source

smallcljs

source

sourcecljs

source

spancljs

source

strongcljs

source

stylecljs

source

subcljs

source

summarycljs

source

supcljs

source

svgcljs

source

tablecljs

source

tbodycljs

source

tdcljs

source

textcljs

source

textareacljs

source

tfootcljs

source

thcljs

source

theadcljs

source

timecljs

source

titlecljs

source

trcljs

source

trackcljs

source

ucljs

source

ulcljs

source

varcljs

source

videocljs

source

wbrcljs

source

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

× close