class Html extends BufferedContent[Html]

Content type used in default HTML templates.

This has 3 states, either it's a tree of elements, or a leaf, if it's a leaf, it's either safe text, or unsafe text that needs to be escaped when written out.

Source
Formats.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Html
  2. BufferedContent
  3. Content
  4. Appendable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Html(elements: Seq[Html])
  2. new Html(text: String)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def body: String

    The content String.

    The content String.

    Definition Classes
    BufferedContentContent
  6. def buildString(builder: StringBuilder): Unit

    We override buildString for performance - allowing text to not be escaped until passed in the final StringBuilder to encode it into.

    We override buildString for performance - allowing text to not be escaped until passed in the final StringBuilder to encode it into.

    An alternative way of implementing this would be to make HtmlFormat.escape return a subclass of Html with a custom buildString implementation. While this does significantly improve performance if a template needs to escape a lot of Strings, if it doesn't, performance actually goes down (measured 10%), due to the fact that the JVM can't optimise the invocation of buildString as well because there are two different possible implementations.

    Attributes
    protected
    Definition Classes
    HtmlBufferedContent
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  8. val contentType: String

    Content type of HTML.

    Content type of HTML.

    Definition Classes
    HtmlContent
  9. val elements: Seq[Html]
    Attributes
    protected
    Definition Classes
    BufferedContent
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(obj: Any): Boolean
    Definition Classes
    BufferedContent → AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. def hashCode(): Int
    Definition Classes
    BufferedContent → AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. val text: String
    Attributes
    protected
    Definition Classes
    BufferedContent
  20. def toString(): String
    Definition Classes
    BufferedContent → AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from BufferedContent[Html]

Inherited from Content

Inherited from Appendable[Html]

Inherited from AnyRef

Inherited from Any

Ungrouped