Class Node

    • Constructor Summary

      Constructors 
      Constructor Description
      Node​(java.lang.Object peer)
      Create a Java instance as wrapper of the JavaScript object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendChild​(Node child)
      https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild
      NodeList childNodes()
      https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes
      int nodeType()
      https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ELEMENT_NODE

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

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

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

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

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

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

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

        public static final int DOCUMENT_FRAGMENT_NODE
        A DocumentFragment node.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Node

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

      • 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