Search ancestor nodes using a predicate function and returns the topmost
ancestor in the chain of consecutive ancestors that satisfies the condition.
|
code » | ||||
Search child nodes using a predicate function and return the first node that
satisfies the condition.
|
code » | ||||
Finds the top-most DOM node inside an editable field that is an ancestor
(or self) of a given DOM node and meets the specified criteria.
|
code » | ||||
Internal helper for lastChild/firstChild that skips nodes that are entirely
whitespace or comments.
|
code » | ||||
Version of firstChild that skips nodes that are entirely
whitespace and comments.
|
code » | ||||
![]()
Utility function that returns the first value from an iterator or null if
the iterator is empty.
Arguments:
Returns: *
The first value from the iterator.
|
code » | ||||
Version of lastChild that skips nodes that are entirely whitespace or
comments. (Normally lastChild is a property of all DOM nodes that gives the
last of the nodes contained directly in the reference node.)
|
code » | ||||
Get the left-most non-ignorable leaf node of the given node.
|
code » | ||||
Returns the length of the text in node if it is a text node, or the number
of children of the node, if it is an element. Useful for range-manipulation
code where you need to know the offset for the right side of the node.
|
code » | ||||
Version of nextSibling that skips nodes that are entirely whitespace or
comments.
|
code » | ||||
Version of previoussibling that skips nodes that are entirely
whitespace or comments. (Normally previousSibling is a property
of all DOM nodes that gives the sibling node, the node that is
a child of the same parent, that occurs immediately before the
reference node.)
|
code » | ||||
Get the right-most non-ignorable leaf node of the given node.
|
code » | ||||
Creates a clone of node, moving all children after startNode to it.
When firstChild is not null or undefined, it is also appended to the clone
as the first child.
|
code » | ||||
Determine whether a node's text content is entirely whitespace.
|
code » | ||||
Checks if node is a block-level html element. The display css
property is ignored.
|
code » | ||||
Checks if a node is inside an editable container.
|
code » | ||||
Checks if an element is a top-level editable container (meaning that
it itself is not editable, but all its child nodes are editable).
|
code » | ||||
Returns true if the node contains only whitespace and is not and does not
contain any images, iframes or embed tags.
|
code » | ||||
Determine if a node should be returned by the iterator functions.
|
code » | ||||
Check if the node is in a standards mode document.
|
code » | ||||
![]()
Replaces the innerHTML of a node.
IE has serious problems if you try to set innerHTML of an editable node with
any selection. Early versions of IE tear up the old internal tree storage, to
help avoid ref-counting loops. But this sometimes leaves the selection object
in a bad state and leads to segfaults.
Removing the nodes first prevents IE from tearing them up. This is not
strictly necessary in nodes that do not have the selection. You should always
use this function when setting innerHTML inside of a field.
|
code » | ||||
Skips siblings of a node that are empty text nodes.
|
code » | ||||
Splits off a subtree.
Arguments:
Returns: !Node
The new subtree.
|
code » | ||||
![]()
Use goog.dom.append directly instead.
Appends all of oldNode's children to newNode. This removes all children from
oldNode and appends them to newNode. oldNode is left with no children.
|
code » |