Liking cljdoc? Tell your friends :D

domina.core


*debug*cljs


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.
raw 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.
raw 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.
raw docstring

attrcljs

(attr content the-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.
raw 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.
raw 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.
raw 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
raw 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.
raw 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.
raw docstring

clonecljs

(clone content)

Returns a deep clone of content.

Returns a deep clone of content.
raw 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.
raw 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.
raw 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.
raw 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.
raw docstring

DomContentcljsprotocol

nodescljs

(nodes content)

Returns the content as a sequence of nodes.

Returns the content as a sequence of nodes.

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

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.
raw 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.
raw 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.
raw 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
raw 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.
raw 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.
raw 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.
raw docstring

logcljs

(log & mesg)

log-debugcljs

(log-debug & mesg)

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.
raw 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.
raw 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.
raw docstring

re-htmlcljs


re-leading-whitespacecljs


re-no-inner-htmlcljs


re-tag-namecljs


re-tbodycljs


re-xhtml-tagcljs


remove-attr!cljs

(remove-attr! content the-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.
raw 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.
raw docstring

set-attr!cljs

(set-attr! content the-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.
raw 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.
raw 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.
raw 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.
raw 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.
raw docstring

set-style!cljs

(set-style! content the-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.
raw 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.
raw 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.
raw 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.
raw docstring

stylecljs

(style content the-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.
raw 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.
raw 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.
raw 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.
raw 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.
raw 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.
raw docstring

wrap-mapcljs

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

× close