Home

# Library goog.editor.node

Function Summary
| `findHighestMatchingAncestor(?Node node, function ((Node|null)): boolean hasProperty) ⇒ ?Node` Search ancestor nodes using a predicate function and returns the topmost ancestor in the chain of consecutive ancestors that satisfies the condition.
| `findInChildren(?Node parent, function ((Node|null)): boolean hasProperty) ⇒ ?number` Search child nodes using a predicate function and return the first node that satisfies the condition.
| `findTopMostEditableAncestor(?Node node, function ((Node|null)): boolean criteria) ⇒ ?Node` 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.
| `getChildHelper_(?Node parent, boolean isReversed) ⇒ ?Node` Internal helper for lastChild/firstChild that skips nodes that are entirely whitespace or comments.
| `getFirstChild(?Node parent) ⇒ ?Node` Version of firstChild that skips nodes that are entirely whitespace and comments.
| `getFirstValue_(?goog.iter.Iterator iterator) ⇒ <Any Type>` Utility function that returns the first value from an iterator or null if the iterator is empty.
| `getLastChild(?Node parent) ⇒ ?Node` 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.)
| `getLeftMostLeaf(?Node parent) ⇒ ?Node` Get the left-most non-ignorable leaf node of the given node.
| `getLength(?Node node) ⇒ number` 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.
| `getNextSibling(?Node sibling) ⇒ ?Node` Version of nextSibling that skips nodes that are entirely whitespace or comments.
| `getPreviousSibling(?Node sibling) ⇒ ?Node` 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.)
| `getRightMostLeaf(?Node parent) ⇒ ?Node` Get the right-most non-ignorable leaf node of the given node.
| `getSecondHalfOfNode_(!Node node, !Node startNode, (Node|null|undefined) firstChild) ⇒ !Node` 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.
| `isAllNonNbspWhiteSpace(?Node textNode) ⇒ boolean` Determine whether a node's text content is entirely whitespace.
| `isBlockTag(?Node node) ⇒ boolean` Checks if node is a block-level html element. The `display` css property is ignored.
| `isEditable(?Node node) ⇒ boolean` Checks if a node is inside an editable container.
| `isEditableContainer(?Node element) ⇒ boolean` Checks if an element is a top-level editable container (meaning that it itself is not editable, but all its child nodes are editable).
| `isEmpty(?Node node, boolean= opt_prohibitSingleNbsp) ⇒ boolean` Returns true if the node contains only whitespace and is not and does not contain any images, iframes or embed tags.
| `isImportant(?Node node) ⇒ boolean` Determine if a node should be returned by the iterator functions.
| `isStandardsMode(?Node node) ⇒ boolean` Check if the node is in a standards mode document.
| `skipEmptyTextNodes(?Node node) ⇒ ?Node` Skips siblings of a node that are empty text nodes.
| `splitDomTreeAt(!Node currentNode, ?Node= opt_secondHalf, ?Node= opt_root) ⇒ !Node` Splits off a subtree.
| `transferChildren(!Node newNode, ?Node oldNode)` 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.