scalatags.generic

Bundle

trait Bundle[Builder, Output] extends AnyRef

An abstract representation of the Scalatags package. This allows you to customize Scalatags to work with different backends, by defining your own implementation of Bundle[T].Tag, and specifying how the various Attrs and Styles contribute to construct the Builder. Apart from satisfying the default String/Boolean/Numeric implementations of Attr and Style, you can also define your own, e.g. ScalaJS ships with an implicit conversion from js.Any to Attr, so that you can attach objects to the resultant dom.Element without serializing them.

By default, Scalatags ships with scalatags.Text: Bundle[StringBuilder] on all platforms, and scalatags.JsDom: Bundle[dom.Element] on ScalaJS.

It is possible to write entirely backend-agnostic Scalatags code by making your code parametric on a Bundle[T] (or some subclass of it), and importing from that rather than importing directly from scalatags.JsDom or scalatags.Text. You will naturally only be able to use functionality (e.g. implicit conversions to Attrs and Styles which are present in the common interface.

Builder

The type to which Attrs and Styles are applied to when the Tag is being rendered to give a final result.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Bundle
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Attr = generic.Attr

  2. type AttrValue[V] = generic.AttrValue[Builder, V]

  3. type Attrs = generic.Attrs[Builder, Output]

  4. type Modifier = generic.Modifier[Builder]

  5. abstract type RawFrag <: Modifier

    A Modifier which contains a String which will not be escaped.

  6. abstract type StringFrag <: Modifier

    A Modifier which contains a String.

  7. type Style = generic.Style

  8. type StyleValue[V] = generic.StyleValue[Builder, V]

  9. type Styles = generic.Styles[Builder, Output]

  10. type Styles2 = generic.Styles2[Builder, Output]

  11. type SvgStyles = generic.SvgStyles[Builder, Output]

  12. type SvgTags = generic.SvgTags[Builder, Output]

  13. abstract type Tag <: TypedTag[Builder, Output]

  14. type Tags = generic.Tags[Builder, Output]

  15. type Tags2 = generic.Tags2[Builder, Output]

  16. type Util = generic.Util[Builder, Output]

Abstract Value Members

  1. abstract val RawFrag: Companion[RawFrag]

  2. abstract val StringFrag: Companion[StringFrag]

  3. abstract val all: Attrs with Styles with Tags with DataConverters with Util

    Convenience object for importing all of Scalatags' functionality at once

  4. abstract val attrs: Attrs

    Common attributes.

  5. implicit abstract def booleanAttr: AttrValue[Boolean]

  6. implicit abstract def booleanStyle: StyleValue[Boolean]

  7. implicit abstract def byteFrag(v: Byte): Modifier

    Lets you put numbers into a scalatags tree, converting them to Strings

  8. implicit abstract def doubleFrag(v: Double): Modifier

    Lets you put numbers into a scalatags tree, converting them to Strings

  9. implicit abstract def floatFrag(v: Float): Modifier

    Lets you put numbers into a scalatags tree, converting them to Strings

  10. implicit abstract def intFrag(v: Int): Modifier

    Lets you put numbers into a scalatags tree, converting them to Strings

  11. implicit abstract def longFrag(v: Long): Modifier

    Lets you put numbers into a scalatags tree, converting them to Strings

  12. implicit abstract def numericAttr[V](implicit arg0: Numeric[V]): AttrValue[V]

  13. implicit abstract def numericStyle[V](implicit arg0: Numeric[V]): StyleValue[V]

  14. abstract def raw(s: String): RawFrag

    Delimits a string that should be included in the result as raw, un-escaped HTML

  15. abstract val short: AbstractShort[Builder, Output]

    Convenience object for importing only Scalatags' tags (e.

    Convenience object for importing only Scalatags' tags (e.g. div, p) into the local namespace, while leaving Styles and Attributes accessible via the * object

  16. implicit abstract def shortFrag(v: Short): Modifier

    Lets you put numbers into a scalatags tree, converting them to Strings

  17. implicit abstract def stringAttr: AttrValue[String]

  18. implicit abstract def stringFrag(v: String): Modifier

    Allows you to modify a HtmlTag by adding a String to its list of children

  19. implicit abstract def stringStyle: StyleValue[String]

  20. abstract val styles: Styles

    Common styles

  21. abstract val styles2: Styles2

    Less common styles

  22. abstract val svgStyles: SvgStyles

    SVG only styles

  23. abstract val svgTags: SvgTags

    SVG only tags

  24. abstract val tags: Tags

    Common tags

  25. abstract val tags2: Tags2

    Less common tags

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped