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 Node = generic.Node[Builder]

  5. abstract type RawNode <: Node

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

  6. abstract type StringNode <: Node

    A Node 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[Output, Builder]

  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. implicit abstract def NumericNode[V](u: V)(implicit arg0: Numeric[V]): Node

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

  2. abstract val RawNode: Companion[RawNode]

  3. abstract val StringNode: Companion[StringNode]

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

    Convenience object for importing all of Scalatags' functionality at once

  5. abstract val attrs: Attrs

    Common attributes.

  6. implicit abstract def booleanAttr: AttrValue[Boolean]

  7. implicit abstract def booleanStyle: StyleValue[Boolean]

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

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

  10. abstract def raw(s: String): RawNode

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

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

  12. implicit abstract def stringAttr: AttrValue[String]

  13. implicit abstract def stringNode(v: String): Node

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

  14. implicit abstract def stringStyle: StyleValue[String]

  15. abstract val styles: Styles

    Common styles

  16. abstract val styles2: Styles2

    Less common styles

  17. abstract val svgStyles: SvgStyles

    SVG only styles

  18. abstract val svgTags: SvgTags

    SVG only tags

  19. abstract val tags: Tags

    Common tags

  20. abstract val tags2: Tags2

    Less common tags

Concrete 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 clone(): AnyRef

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  16. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped