Class Document


  • public class Document
    extends Node
    https://developer.mozilla.org/en-US/docs/Web/API/Document
    • Constructor Detail

      • Document

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

      • createElement

        public <T extends HTMLElement> T createElement​(java.lang.String tagName)
        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

        public Text createTextNode​(java.lang.String data)
        https://developer.mozilla.org/en-US/docs/Web/API/Document/createTextNode
        Parameters:
        data - the text data
        Returns:
        the text node
      • body

        public Node body()
        https://developer.mozilla.org/en-US/docs/Web/API/Document/body
        Returns:
        the body