Class Document
java.lang.Object
de.inetsoftware.jwebassembly.web.JSObject
de.inetsoftware.jwebassembly.web.dom.EventTarget
de.inetsoftware.jwebassembly.web.dom.Node
de.inetsoftware.jwebassembly.web.dom.Document
https://developer.mozilla.org/en-US/docs/Web/API/Document
-
Field Summary
Fields inherited from class de.inetsoftware.jwebassembly.web.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody()
https://developer.mozilla.org/en-US/docs/Web/API/Document/body<T extends HTMLElement>
TcreateElement
(String tagName) https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementcreateTextNode
(String data) https://developer.mozilla.org/en-US/docs/Web/API/Document/createTextNodeMethods inherited from class de.inetsoftware.jwebassembly.web.dom.Node
appendChild, childNodes, nodeType
-
Constructor Details
-
Document
Document(Object peer) Create a Java instance as wrapper of the JavaScript object.- Parameters:
peer
- the native JavaScript object
-
-
Method Details
-
createElement
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement- Type Parameters:
T
- the return type- Parameters:
tagName
- type of element- Returns:
- The new Element
-
createTextNode
https://developer.mozilla.org/en-US/docs/Web/API/Document/createTextNode- Parameters:
data
- the text data- Returns:
- the text node
-
body
https://developer.mozilla.org/en-US/docs/Web/API/Document/body- Returns:
- the body
-