Class Node
java.lang.Object
de.inetsoftware.jwebassembly.web.JSObject
de.inetsoftware.jwebassembly.web.dom.EventTarget
de.inetsoftware.jwebassembly.web.dom.Node
- Direct Known Subclasses:
CharacterData, Document, Element
https://developer.mozilla.org/en-US/docs/Web/API/Node
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAn Attribute of an Element.static final intA CDATASection, such as <!CDATA[[ … ]]<.static final intA Comment node, such as <!-- … --<.static final intA DocumentFragment node.static final intA Document node.static final intA DocumentType node, such as <!DOCTYPE html<.static final intAn Element node like <p> or <div>static final intA ProcessingInstruction of an XML document, such as <?xml-stylesheet … ?<.static final intThe actual Text inside an Element or Attr. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendChild(Node child) https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChildhttps://developer.mozilla.org/en-US/docs/Web/API/Node/childNodesintnodeType()https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
-
Field Details
-
ELEMENT_NODE
public static final int ELEMENT_NODEAn Element node like <p> or <div>- See Also:
-
ATTRIBUTE_NODE
public static final int ATTRIBUTE_NODEAn Attribute of an Element.- See Also:
-
TEXT_NODE
public static final int TEXT_NODEThe actual Text inside an Element or Attr.- See Also:
-
CDATA_SECTION_NODE
public static final int CDATA_SECTION_NODEA CDATASection, such as <!CDATA[[ … ]]<.- See Also:
-
PROCESSING_INSTRUCTION_NODE
public static final int PROCESSING_INSTRUCTION_NODEA ProcessingInstruction of an XML document, such as <?xml-stylesheet … ?<.- See Also:
-
COMMENT_NODE
public static final int COMMENT_NODEA Comment node, such as <!-- … --<.- See Also:
-
DOCUMENT_NODE
public static final int DOCUMENT_NODEA Document node.- See Also:
-
DOCUMENT_TYPE_NODE
public static final int DOCUMENT_TYPE_NODEA DocumentType node, such as <!DOCTYPE html<.- See Also:
-
DOCUMENT_FRAGMENT_NODE
public static final int DOCUMENT_FRAGMENT_NODEA 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
https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes- Returns:
- list of chield nodes
-
appendChild
https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild- Parameters:
child- the child
-