Class/Object

play.twirl.api

Html

Related Docs: object Html | package api

Permalink

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. All

Instance Constructors

  1. new Html(elements: Seq[Html])

    Permalink
  2. new Html(text: String)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def body: String

    Permalink

    The content String.

    The content String.

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

    Permalink

    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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val contentType: String

    Permalink

    Content type of HTML.

    Content type of HTML.

    Definition Classes
    HtmlContent
  9. val elements: Seq[Html]

    Permalink

    Sub elements to traverse when creating the resultant string

    Sub elements to traverse when creating the resultant string

    Attributes
    protected
    Definition Classes
    BufferedContent
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    BufferedContent → AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    BufferedContent → AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. val text: String

    Permalink

    Formatted content

    Formatted content

    Attributes
    protected
    Definition Classes
    BufferedContent
  21. def toString(): String

    Permalink
    Definition Classes
    BufferedContent → AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BufferedContent[Html]

Inherited from Content

Inherited from Appendable[Html]

Inherited from AnyRef

Inherited from Any

Ungrouped