Interface Comment

All Superinterfaces:
org.teavm.jso.JSObject

public interface Comment extends org.teavm.jso.JSObject
An HTML comment.
Since:
1.0.3
  • Method Details

    • getText

      String getText()
      Returns the text between <!-- and -->.
      Returns:
      the text between <!-- and -->
    • setText

      void setText(String text)
      Changes the comment's text.
      Parameters:
      text - the new text
    • isRemoved

      boolean isRemoved()
      Returns whether an earlier handler already removed or replaced this comment.
      Returns:
      whether an earlier handler already removed or replaced this comment
    • before

      Comment before(String content)
      Inserts text before the comment.
      Parameters:
      content - the text, escaped
      Returns:
      this comment
    • before

      Comment before(String content, ContentOptions options)
      Inserts content before the comment.
      Parameters:
      content - the content
      options - how to read it
      Returns:
      this comment
    • after

      Comment after(String content)
      Inserts text after the comment.
      Parameters:
      content - the text, escaped
      Returns:
      this comment
    • after

      Comment after(String content, ContentOptions options)
      Inserts content after the comment.
      Parameters:
      content - the content
      options - how to read it
      Returns:
      this comment
    • replace

      Comment replace(String content)
      Replaces the comment by text.
      Parameters:
      content - the text, escaped
      Returns:
      this comment
    • replace

      Comment replace(String content, ContentOptions options)
      Replaces the comment by other content.
      Parameters:
      content - the content
      options - how to read it
      Returns:
      this comment
    • remove

      Comment remove()
      Removes the comment.
      Returns:
      this comment