Trait

scalatags.generic

Bundle

Related Doc: package generic

Permalink

trait Bundle[Builder, Output <: FragT, FragT] extends Aliases[Builder, Output, FragT]

An abstract representation of the Scalatags package. This allows you to customize Scalatags to work with different backends, by defining your own implementation of 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 (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
Aliases[Builder, Output, FragT], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bundle
  2. Aliases
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type AbstractShort = generic.AbstractShort[Builder, Output, FragT]

    Permalink
  2. type Attr = generic.Attr

    Permalink
    Definition Classes
    Aliases
  3. type AttrPair = generic.AttrPair[Builder, FragT]

    Permalink
    Definition Classes
    Aliases
  4. type AttrValue[V] = generic.AttrValue[Builder, V]

    Permalink
    Definition Classes
    Aliases
  5. type Attrs = generic.Attrs[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  6. type Frag = generic.Frag[Builder, FragT]

    Permalink
    Definition Classes
    Aliases
  7. type Modifier = generic.Modifier[Builder]

    Permalink
    Definition Classes
    Aliases
  8. type PixelStyleValue[V] = generic.PixelStyleValue[Builder, V]

    Permalink
    Definition Classes
    Aliases
  9. abstract type RawFrag <: Modifier

    Permalink

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

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

    Attributes
    protected[this]
    Definition Classes
    Aliases
  10. abstract type StringFrag <: Modifier

    Permalink

    A Modifier which contains a String.

    A Modifier which contains a String.

    Attributes
    protected[this]
    Definition Classes
    Aliases
  11. type Style = generic.Style

    Permalink
    Definition Classes
    Aliases
  12. type StyleValue[V] = generic.StyleValue[Builder, V]

    Permalink
    Definition Classes
    Aliases
  13. type Styles = generic.Styles[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  14. type Styles2 = generic.Styles2[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  15. type SvgAttrs = generic.SvgAttrs[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  16. type SvgTags = generic.SvgTags[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  17. type Tag = TypedTag[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  18. type Tags = generic.Tags[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  19. type Tags2 = generic.Tags2[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases
  20. type Util = generic.Util[Builder, Output, FragT]

    Permalink
    Definition Classes
    Aliases

Abstract Value Members

  1. abstract val RawFrag: Companion[RawFrag]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Aliases
  2. abstract val StringFrag: Companion[StringFrag]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Aliases
  3. abstract val all: Attrs with Styles with Tags with DataConverters with Util with Aggregate[Builder, Output, FragT]

    Permalink

    Convenience object for importing all of Scalatags' functionality at once

  4. abstract val attrs: Attrs

    Permalink

    Common attributes.

  5. abstract val implicits: Aggregate[Builder, Output, FragT] with DataConverters

    Permalink

    Convenience object for only importing Scalatag's implicits, without importing any of the tags, styles or attributes themselves.

    Convenience object for only importing Scalatag's implicits, without importing any of the tags, styles or attributes themselves. This includes conversions to Modifier, typeclass instances for treating strings and numbers as attributes or style values, and other things.

  6. abstract val short: AbstractShort with Tags with DataConverters with Aggregate[Builder, Output, FragT]

    Permalink

    Convenience object for importing only Scalatags' tags (e.g.

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

  7. abstract val styles: Styles

    Permalink

    Common styles

  8. abstract val styles2: Styles2

    Permalink

    Less common styles

  9. abstract val svgAttrs: SvgAttrs

    Permalink

    SVG only attributes

  10. abstract val svgTags: SvgTags

    Permalink

    SVG only tags

  11. abstract val tags: Tags

    Permalink

    Common tags

  12. abstract val tags2: Tags2

    Permalink

    Less common tags

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

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

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

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

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

Inherited from Aliases[Builder, Output, FragT]

Inherited from AnyRef

Inherited from Any

Ungrouped