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
- Alphabetic
- By Inheritance
- Html
- BufferedContent
- Content
- Appendable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def body: String
The content String.
The content String.
- Definition Classes
- BufferedContent → Content
- 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
- Html → BufferedContent
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val contentType: String
Content type of HTML.
- val elements: Seq[Html]
- Attributes
- protected
- Definition Classes
- BufferedContent
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(obj: Any): Boolean
- Definition Classes
- BufferedContent → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- BufferedContent → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val text: String
- Attributes
- protected
- Definition Classes
- BufferedContent
- def toString(): String
- Definition Classes
- BufferedContent → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()