@Generated(value="org.realityforge.webtack") @JsType(isNative=true, namespace="<global>", name="Node") public class Node extends EventTarget
Modifier and Type | Field and Description |
---|---|
static int |
ATTRIBUTE_NODE |
static int |
CDATA_SECTION_NODE |
static int |
COMMENT_NODE |
static int |
DOCUMENT_FRAGMENT_NODE |
static int |
DOCUMENT_NODE |
static int |
DOCUMENT_POSITION_CONTAINED_BY |
static int |
DOCUMENT_POSITION_CONTAINS |
static int |
DOCUMENT_POSITION_DISCONNECTED |
static int |
DOCUMENT_POSITION_FOLLOWING |
static int |
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC |
static int |
DOCUMENT_POSITION_PRECEDING |
static int |
DOCUMENT_TYPE_NODE |
static int |
ELEMENT_NODE |
static int |
ENTITY_NODE |
static int |
ENTITY_REFERENCE_NODE |
java.lang.String |
nodeValue
The nodeValue property of the Node interface returns or sets the value of the current node.
|
static int |
NOTATION_NODE |
static int |
PROCESSING_INSTRUCTION_NODE |
static int |
TEXT_NODE |
java.lang.String |
textContent
The textContent property of the Node interface represents the text content of the node and its descendants.
|
Modifier | Constructor and Description |
---|---|
protected |
Node() |
Modifier and Type | Method and Description |
---|---|
Node |
appendChild(Node node)
The Node.appendChild() method adds a node to the end of the list of children of a specified parent node.
|
java.lang.String |
baseURI()
The baseURI read-only property returns the absolute base URL of a Node.
|
NodeList |
childNodes()
The Node.childNodes read-only property returns a live NodeList of child nodes of the given element where the first child node is assigned index 0.
|
Node |
cloneNode()
The Node.cloneNode() method returns a duplicate of the node on which this method was called.
|
Node |
cloneNode(boolean deep)
The Node.cloneNode() method returns a duplicate of the node on which this method was called.
|
int |
compareDocumentPosition(Node other)
The Node.compareDocumentPosition() method reports the position of the given node relative to another node in any document — not just the given node’s document.
|
boolean |
contains(Node other)
The Node.contains() method returns a Boolean value indicating whether a node is a descendant of a given node, i.e.
|
Node |
firstChild()
The Node.firstChild read-only property returns the node's first child in the tree, or null if the node has no children.
|
Node |
getRootNode()
The getRootNode() method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.
|
Node |
getRootNode(GetRootNodeOptions options)
The getRootNode() method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.
|
boolean |
hasChildNodes()
The Node.hasChildNodes() method returns a Boolean value indicating whether the given Node has child nodes or not.
|
Node |
insertBefore(Node node,
Node child)
The Node.insertBefore() method inserts a node before a reference node as a child of a specified parent node.
|
boolean |
isConnected()
The isConnected read-only property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to the context object, for example the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM.
|
boolean |
isDefaultNamespace(java.lang.String namespace)
The Node.isDefaultNamespace() method accepts a namespace URI as an argument and returns a Boolean with a value of true if the namespace is the default namespace on the given node or false if not.
|
boolean |
isEqualNode(Node otherNode)
The Node.isEqualNode() method tests whether two nodes are equal.
|
boolean |
isSameNode(Node otherNode)
The isSameNode() method for Node objects tests whether two nodes are the same (that is, whether they reference the same object).
|
Node |
lastChild()
The Node.lastChild read-only property returns the last child of the node.
|
java.lang.String |
lookupNamespaceURI(java.lang.String prefix)
The Node.lookupNamespaceURI() method accepts a prefix and returns the namespace URI associated with it on the given node if found (and null if not).
|
java.lang.String |
lookupPrefix(java.lang.String namespace)
The Node.lookupPrefix() method returns a DOMString containing the prefix for a given namespace URI, if present, and null if not.
|
Node |
nextSibling()
The Node.nextSibling read-only property returns the node immediately following the specified one in their parent's childNodes, or returns null if the specified node is the last child in the parent element.
|
java.lang.String |
nodeName()
The nodeName read-only property returns the name of the current Node as a string.
|
int |
nodeType()
The read-only Node.nodeType property is an integer that identifies what the node is.
|
void |
normalize()
The Node.normalize() method puts the specified node and all of its sub-tree into a "normalized" form.
|
Document |
ownerDocument()
The ownerDocument read-only property of the Node interface returns the top-level document object of the node.
|
Element |
parentElement()
The Node.parentElement read-only property returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element.
|
Node |
parentNode()
The Node.parentNode read-only property returns the parent of the specified node in the DOM tree.
|
Node |
previousSibling()
The Node.previousSibling read-only property returns the node immediately preceding the specified one in its parent's childNodes list, or null if the specified node is the first in that list.
|
Node |
removeChild(Node child)
The Node.removeChild() method removes a child node from the DOM and returns the removed node.
|
Node |
replaceChild(Node node,
Node child)
The Node.replaceChild() method replaces a child node within the given (parent) node.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListener
@JsOverlay public static final int ATTRIBUTE_NODE
@JsOverlay public static final int CDATA_SECTION_NODE
@JsOverlay public static final int COMMENT_NODE
@JsOverlay public static final int DOCUMENT_FRAGMENT_NODE
@JsOverlay public static final int DOCUMENT_NODE
@JsOverlay public static final int DOCUMENT_POSITION_CONTAINED_BY
@JsOverlay public static final int DOCUMENT_POSITION_CONTAINS
@JsOverlay public static final int DOCUMENT_POSITION_DISCONNECTED
@JsOverlay public static final int DOCUMENT_POSITION_FOLLOWING
@JsOverlay public static final int DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
@JsOverlay public static final int DOCUMENT_POSITION_PRECEDING
@JsOverlay public static final int DOCUMENT_TYPE_NODE
@JsOverlay public static final int ELEMENT_NODE
@JsOverlay public static final int ENTITY_NODE
@JsOverlay public static final int ENTITY_REFERENCE_NODE
@JsOverlay public static final int NOTATION_NODE
@JsOverlay public static final int PROCESSING_INSTRUCTION_NODE
@JsOverlay public static final int TEXT_NODE
@Nullable public java.lang.String nodeValue
@Nullable public java.lang.String textContent
@JsProperty(name="baseURI") @Nonnull public java.lang.String baseURI()
@JsProperty(name="childNodes") @Nonnull public NodeList childNodes()
@JsProperty(name="firstChild") @Nullable public Node firstChild()
@JsProperty(name="isConnected") public boolean isConnected()
@JsProperty(name="lastChild") @Nullable public Node lastChild()
@JsProperty(name="nextSibling") @Nullable public Node nextSibling()
@JsProperty(name="nodeName") @Nonnull public java.lang.String nodeName()
@JsProperty(name="nodeType") @NodeType public int nodeType()
@JsProperty(name="ownerDocument") @Nullable public Document ownerDocument()
@JsProperty(name="parentElement") @Nullable public Element parentElement()
@JsProperty(name="parentNode") @Nullable public Node parentNode()
@JsProperty(name="previousSibling") @Nullable public Node previousSibling()
@Nonnull public Node appendChild(@Nonnull Node node)
@Nonnull public Node cloneNode(boolean deep)
@Nonnull public Node cloneNode()
public int compareDocumentPosition(@Nonnull Node other)
public boolean contains(@Nullable Node other)
@Nonnull public Node getRootNode(@Nonnull GetRootNodeOptions options)
@Nonnull public Node getRootNode()
public boolean hasChildNodes()
@Nonnull public Node insertBefore(@Nonnull Node node, @Nullable Node child)
public boolean isDefaultNamespace(@Nullable java.lang.String namespace)
public boolean isEqualNode(@Nullable Node otherNode)
public boolean isSameNode(@Nullable Node otherNode)
@Nullable public java.lang.String lookupNamespaceURI(@Nullable java.lang.String prefix)
@Nullable public java.lang.String lookupPrefix(@Nullable java.lang.String namespace)
public void normalize()
@Nonnull public Node removeChild(@Nonnull Node child)
@Nonnull public Node replaceChild(@Nonnull Node node, @Nonnull Node child)