Direct Known Subclasses:
CharacterData, Document, Element

public class Node extends EventTarget
https://developer.mozilla.org/en-US/docs/Web/API/Node
  • Field Details

    • ELEMENT_NODE

      public static final int ELEMENT_NODE
      An Element node like <p> or <div>
      See Also:
    • ATTRIBUTE_NODE

      public static final int ATTRIBUTE_NODE
      An Attribute of an Element.
      See Also:
    • TEXT_NODE

      public static final int TEXT_NODE
      The actual Text inside an Element or Attr.
      See Also:
    • CDATA_SECTION_NODE

      public static final int CDATA_SECTION_NODE
      A CDATASection, such as <!CDATA[[ … ]]<.
      See Also:
    • PROCESSING_INSTRUCTION_NODE

      public static final int PROCESSING_INSTRUCTION_NODE
      A ProcessingInstruction of an XML document, such as <?xml-stylesheet … ?<.
      See Also:
    • COMMENT_NODE

      public static final int COMMENT_NODE
      A Comment node, such as <!-- … --<.
      See Also:
    • DOCUMENT_NODE

      public static final int DOCUMENT_NODE
      A Document node.
      See Also:
    • DOCUMENT_TYPE_NODE

      public static final int DOCUMENT_TYPE_NODE
      A DocumentType node, such as <!DOCTYPE html<.
      See Also:
    • DOCUMENT_FRAGMENT_NODE

      public static final int DOCUMENT_FRAGMENT_NODE
      A DocumentFragment node.
      See Also:
  • Constructor Details

    • Node

      Node(Object peer)
      Create a Java instance as wrapper of the JavaScript object.
      Parameters:
      peer - the native JavaScript object
  • Method Details

    • nodeType

      public int nodeType()
      https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
      Returns:
      the node type
    • childNodes

      public NodeList childNodes()
      https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes
      Returns:
      list of chield nodes
    • appendChild

      public void appendChild(Node child)
      https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild
      Parameters:
      child - the child