Interface Text

All Superinterfaces:
CharacterData, EventTarget, Node, NonDocumentTypeChildNode
All Known Subinterfaces:
CDATASection
All Known Implementing Classes:
CDataSectionImpl, DTMNodeProxy, TextImpl

public interface Text extends CharacterData
The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.
  • Method Details

    • getAssignedSlot

      HTMLSlotElement getAssignedSlot()

      getAssignedSlot.

      Returns:
      a HTMLSlotElement object.
    • getWholeText

      String getWholeText()
      Returns the combined data of all direct Text node siblings.
      Returns:
      a String object.
    • splitText

      Text splitText(int offset)
      Splits data at the given offset and returns the remainder as Text node.
      Parameters:
      offset - a Integer object.
      Returns:
      a Text object.
    • isElementContentWhitespace

      boolean isElementContentWhitespace()

      isElementContentWhitespace.

      Returns:
      a boolean.
    • replaceWholeText

      Text replaceWholeText(String content)

      replaceWholeText.

      Parameters:
      content - a String object.
      Returns:
      a Text object.