Liking cljdoc? Tell your friends :D

domina.core


*debug*cljs

source

add-class!cljs

(add-class! content class)

Adds the specified CSS class to each node in the content.

Adds the specified CSS class to each node in the content.
sourceraw docstring

ancestor?cljs

(ancestor? ancestor-content descendant-content)

Returns true if the first argument is an ancestor of the second argument. Presumes both arguments are single-node contents.

Returns true if the first argument is an ancestor of the second argument. Presumes both arguments are single-node contents.
sourceraw docstring

append!cljs

(append! parent-content child-content)

Given a parent and child contents, appends each of the children to all of the parents. If there is more than one node in the parent content, clones the children for the additional parents. Returns the parent content.

Given a parent and child contents, appends each of the children to all of the parents. If there is more than one node in the parent content, clones the children for the additional parents. Returns the parent content.
sourceraw docstring

attrcljs

(attr content name)

Gets the value of an HTML attribute. Assumes content will be a single node. Name may be a stirng or keyword. Returns nil if there is no value set for the style.

Gets the value of an HTML attribute. Assumes content will be a single node. Name may be a stirng or keyword. Returns nil if there is no value set for the style.
sourceraw docstring

attrscljs

(attrs content)

Returns a map of the HTML attributes/values. Assumes content will be a single node. Attribute names are returned as keywords.

Returns a map of the HTML attributes/values. Assumes content will be a single node. Attribute names are returned as keywords.
sourceraw docstring

by-classcljs

(by-class class-name)

Returns content containing nodes which have the specified CSS class.

Returns content containing nodes which have the specified CSS class.
sourceraw docstring

by-idcljs

(by-id id)

Returns content containing a single node by looking up the given ID

Returns content containing a single node by looking up the given ID
sourceraw docstring

childrencljs

(children content)

Gets all the child nodes of the elements in a content. Same as (xpath content '*') but more efficient.

Gets all the child nodes of the elements in a content. Same as (xpath content '*') but more efficient.
sourceraw docstring

classescljs

(classes content)

Returns a seq of all the CSS classes currently applied to a node. Assumes content is a single node.

Returns a seq of all the CSS classes currently applied to a node. Assumes content is a single node.
sourceraw docstring

clonecljs

(clone content)

Returns a deep clone of content.

Returns a deep clone of content.
sourceraw docstring

common-ancestorcljs

(common-ancestor & contents)

Returns the deepest common ancestor of the argument contents (which are presumed to be single nodes), or nil if they are from different documents.

Returns the deepest common ancestor of the argument contents (which are presumed to be single nodes), or nil if they are from different documents.
sourceraw docstring

destroy!cljs

(destroy! content)

Removes all the nodes in a content from the DOM. Returns nil.

Removes all the nodes in a content from the DOM. Returns nil.
sourceraw docstring

destroy-children!cljs

(destroy-children! content)

Removes all the child nodes in a content from the DOM. Returns the original content.

Removes all the child nodes in a content from the DOM. Returns the original content.
sourceraw docstring

detach!cljs

(detach! content)

Removes all the nodes in a content from the DOM and returns them.

Removes all the nodes in a content from the DOM and returns them.
sourceraw docstring

DomContentcljsprotocol

single-nodecljs

(single-node nodeseq)

Returns the content as a single node (the first node, if the content contains more than one

Returns the content as a single node (the first node, if the content contains more than one

nodescljs

(nodes content)

Returns the content as a sequence of nodes.

Returns the content as a sequence of nodes.
source

get-datacljs

(get-data node key)
(get-data node key bubble)

Returns data associated with a node for a given key. Assumes content is a single node. If the bubble parameter is set to true, will search parent nodes if the key is not found.

Returns data associated with a node for a given key. Assumes
content is a single node. If the bubble parameter is set to true,
will search parent nodes if the key is not found.
sourceraw docstring

has-class?cljs

(has-class? content class)

Returns true if the node has the specified CSS class. Assumes content is a single node.

Returns true if the node has the specified CSS class. Assumes content is a single node.
sourceraw docstring

htmlcljs

(html content)

Returns the innerHTML of a node. Assumes content is a single node.

Returns the innerHTML of a node. Assumes content is a single node.
sourceraw docstring

html-to-domcljs

(html-to-dom html)

takes an string of html and returns a NodeList of dom fragments

takes an string of html and returns a NodeList of dom fragments
sourceraw docstring

insert!cljs

(insert! parent-content child-content idx)

Given a parent and child contents, appends each of the children to all of the parents at the specified index. If there is more than one node in the parent content, clones the children for the additional parents. Returns the parent content.

Given a parent and child contents, appends each of the children to all of the parents at the specified index. If there is more than one node in the parent content, clones the children for the additional parents. Returns the parent content.
sourceraw docstring

insert-after!cljs

(insert-after! content new-content)

Given a content and some new content, inserts the new content immediately after the reference content. If there is more than one node in the reference content, clones the new content for each one.

Given a content and some new content, inserts the new content immediately after the reference content. If there is more than one node in the reference content, clones the new content for each one.
sourceraw docstring

insert-before!cljs

(insert-before! content new-content)

Given a content and some new content, inserts the new content immediately before the reference content. If there is more than one node in the reference content, clones the new content for each one.

Given a content and some new content, inserts the new content immediately before the reference content. If there is more than one node in the reference content, clones the new content for each one.
sourceraw docstring

logcljs

(log & mesg)
source

log-debugcljs

(log-debug & mesg)
source

normalize-seqcljs

(normalize-seq list-thing)

Some versions of IE have things that are like arrays in that they respond to .length, but are not arrays nor NodeSets. This returns a real sequence view of such objects. If passed an object that is not a logical sequence at all, returns a single-item seq containing the object.

Some versions of IE have things that are like arrays in that they
respond to .length, but are not arrays nor NodeSets. This returns a
real sequence view of such objects. If passed an object that is not
a logical sequence at all, returns a single-item seq containing the
object.
sourceraw docstring

parse-style-attributescljs

(parse-style-attributes style)

Parses a CSS style string and returns the properties as a map.

Parses a CSS style string and returns the properties as a map.
sourceraw docstring

prepend!cljs

(prepend! parent-content child-content)

Given a parent and child contents, prepends each of the children to all of the parents. If there is more than one node in the parent content, clones the children for the additional parents. Returns the parent content.

Given a parent and child contents, prepends each of the children to all of the parents. If there is more than one node in the parent content, clones the children for the additional parents. Returns the parent content.
sourceraw docstring

re-htmlcljs

source

re-leading-whitespacecljs

source

re-no-inner-htmlcljs

source

re-tag-namecljs

source

re-tbodycljs

source

re-xhtml-tagcljs

source

remove-attr!cljs

(remove-attr! content name)

Removes the specified HTML property for each node in the content. Name may be a string or keyword.

Removes the specified HTML property for each node in the content. Name may be a string or keyword.
sourceraw docstring

remove-class!cljs

(remove-class! content class)

Removes the specified CSS class from each node in the content.

Removes the specified CSS class from each node in the content.
sourceraw docstring

set-attr!cljs

(set-attr! content name & value)

Sets the value of an HTML property for each node in the content. Name may be a string or keyword. Value will be cast to a string, multiple values wil be concatenated.

Sets the value of an HTML property for each node in the content. Name may be a string or keyword. Value will be cast to a string, multiple values wil be concatenated.
sourceraw docstring

set-attrs!cljs

(set-attrs! content attrs)

Sets the specified attributes for each node in the content, given a map of names and values. Names may be a string or keyword. Values will be cast to a string, multiple values wil be concatenated.

Sets the specified attributes for each node in the content, given a map of names and values. Names may be a string or keyword. Values will be cast to a string, multiple values wil be concatenated.
sourceraw docstring

set-classes!cljs

(set-classes! content classes)

Sets the class attribute of the content nodes to classes, which can be either a class attribute string or a seq of classname strings.

Sets the class attribute of the content nodes to classes, which can
be either a class attribute string or a seq of classname strings.
sourceraw docstring

set-data!cljs

(set-data! node key value)

Sets a data on the node for a given key. Assumes content is a single node. Data should be ClojureScript values and data structures only; using other objects as data may result in memory leaks on some browsers.

Sets a data on the node for a given key. Assumes content is a
single node. Data should be ClojureScript values and data structures
only; using other objects as data may result in memory leaks on some
browsers.
sourceraw docstring

set-html!cljs

(set-html! content inner-content)

Sets the innerHTML value for all the nodes in the given content.

Sets the innerHTML value for all the nodes in the given content.
sourceraw docstring

set-style!cljs

(set-style! content name & value)

Sets the value of a CSS property for each node in the content. Name may be a string or keyword. Value will be cast to a string, multiple values wil be concatenated.

Sets the value of a CSS property for each node in the content. Name may be a string or keyword. Value will be cast to a string, multiple values wil be concatenated.
sourceraw docstring

set-styles!cljs

(set-styles! content styles)

Sets the specified CSS styles for each node in the content, given a map of names and values. Style names may be keywords or strings.

Sets the specified CSS styles for each node in the content, given a map of names and values. Style names may be keywords or strings.
sourceraw docstring

set-text!cljs

(set-text! content value)

Sets the text value of all the nodes in the given content.

Sets the text value of all the nodes in the given content.
sourceraw docstring

set-value!cljs

(set-value! content value)

Sets the value of all the nodes (presumably form fields) in the given content.

Sets the value of all the nodes (presumably form fields) in the given content.
sourceraw docstring

stylecljs

(style content name)

Gets the value of a CSS property. Assumes content will be a single node. Name may be a string or keyword. Returns nil if there is no value set for the style.

Gets the value of a CSS property. Assumes content will be a single node. Name may be a string or keyword. Returns nil if there is no value set for the style.
sourceraw docstring

stylescljs

(styles content)

Returns a map of the CSS styles/values. Assumes content will be a single node. Style names are returned as keywords.

Returns a map of the CSS styles/values. Assumes content will be a single node. Style names are returned as keywords.
sourceraw docstring

swap-content!cljs

(swap-content! old-content new-content)

Given some old content and some new content, replaces the old content with new content. If there are multiple nodes in the old content, replaces each of them and clones the new content as necessary.

Given some old content and some new content, replaces the old content with new content. If there are multiple nodes in the old content, replaces each of them and clones the new content as necessary.
sourceraw docstring

textcljs

(text content)

Returns the text of a node. Assumes content is a single node. For consistency across browsers, will always trim whitespace of the beginning and end of the returned text.

Returns the text of a node. Assumes content is a single node. For consistency across browsers, will always trim whitespace of the beginning and end of the returned text.
sourceraw docstring

toggle-class!cljs

(toggle-class! content class)

Toggles the specified CSS class from each node in the content.

Toggles the specified CSS class from each node in the content.
sourceraw docstring

valuecljs

(value content)

Returns the value of a node (presumably a form field). Assumes content is a single node.

Returns the value of a node (presumably a form field). Assumes content is a single node.
sourceraw docstring

wrap-mapcljs

source

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

× close