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.
- Alphabetic
- By Inheritance
- Bundle
- Aliases
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type AbstractShort = generic.AbstractShort[Builder, Output, FragT]
- type Attr = generic.Attr
- Definition Classes
- Aliases
- type AttrPair = generic.AttrPair[Builder, FragT]
- Definition Classes
- Aliases
- type AttrValue[V] = generic.AttrValue[Builder, V]
- Definition Classes
- Aliases
- type Attrs = generic.Attrs[Builder, Output, FragT]
- Definition Classes
- Aliases
- type Frag = generic.Frag[Builder, FragT]
- Definition Classes
- Aliases
- type Modifier = generic.Modifier[Builder]
- Definition Classes
- Aliases
- type PixelStyleValue[V] = generic.PixelStyleValue[Builder, V]
- Definition Classes
- Aliases
- abstract type RawFrag <: Modifier
A Modifier which contains a String which will not be escaped.
- abstract type StringFrag <: Modifier
A Modifier which contains a String.
- type Style = generic.Style
- Definition Classes
- Aliases
- type StyleValue[V] = generic.StyleValue[Builder, V]
- Definition Classes
- Aliases
- type Styles = generic.Styles[Builder, Output, FragT]
- Definition Classes
- Aliases
- type Styles2 = generic.Styles2[Builder, Output, FragT]
- Definition Classes
- Aliases
- type SvgAttrs = generic.SvgAttrs[Builder, Output, FragT]
- Definition Classes
- Aliases
- type SvgTags = generic.SvgTags[Builder, Output, FragT]
- Definition Classes
- Aliases
- type Tag = TypedTag[Builder, Output, FragT]
- Definition Classes
- Aliases
- type Tags = generic.Tags[Builder, Output, FragT]
- Definition Classes
- Aliases
- type Tags2 = generic.Tags2[Builder, Output, FragT]
- Definition Classes
- Aliases
- type Util = generic.Util[Builder, Output, FragT]
- Definition Classes
- Aliases
Abstract Value Members
- abstract val RawFrag: Companion[RawFrag]
- Attributes
- protected[this]
- Definition Classes
- Aliases
- abstract val StringFrag: Companion[StringFrag]
- Attributes
- protected[this]
- Definition Classes
- Aliases
- abstract val all: Attrs with Styles with Tags with DataConverters with Util with Aggregate[Builder, Output, FragT]
Convenience object for importing all of Scalatags' functionality at once
- abstract val attrs: Attrs
Common attributes.
- abstract val implicits: Aggregate[Builder, Output, FragT] with DataConverters
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.
- abstract val short: AbstractShort with Tags with DataConverters with Aggregate[Builder, Output, FragT]
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 - abstract val styles: Styles
Common styles
- abstract val styles2: Styles2
Less common styles
- abstract val svgAttrs: SvgAttrs
SVG only attributes
- abstract val svgTags: SvgTags
SVG only tags
- abstract val tags: Tags
Common tags
- abstract val tags2: Tags2
Less common tags
Concrete 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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.