trait
Bundle[Builder, Output <: FragT, FragT] extends AnyRef
Type Members
-
-
-
type
Attrs = generic.Attrs[Builder, Output, FragT]
-
-
abstract
type
RawFrag <: Modifier
-
abstract
type
StringFrag <: Modifier
-
-
-
type
Styles = generic.Styles[Builder, Output, FragT]
-
type
Styles2 = generic.Styles2[Builder, Output, FragT]
-
type
SvgStyles = generic.SvgStyles[Builder, Output, FragT]
-
type
SvgTags = generic.SvgTags[Builder, Output, FragT]
-
abstract
type
Tag <: TypedTag[Builder, Output, FragT]
-
type
Tags = generic.Tags[Builder, Output, FragT]
-
type
Tags2 = generic.Tags2[Builder, Output, FragT]
-
type
Util = generic.Util[Builder, Output, FragT]
Abstract Value Members
-
-
-
-
abstract
val
attrs: Attrs
-
implicit abstract
def
booleanAttr: AttrValue[Boolean]
-
implicit abstract
def
booleanStyle: StyleValue[Boolean]
-
implicit abstract
def
byteFrag(v: Byte): Frag[Builder, Output, FragT]
-
implicit abstract
def
doubleFrag(v: Double): Frag[Builder, Output, FragT]
-
implicit abstract
def
floatFrag(v: Float): Frag[Builder, Output, FragT]
-
implicit abstract
def
intFrag(v: Int): Frag[Builder, Output, FragT]
-
implicit abstract
def
longFrag(v: Long): Frag[Builder, Output, FragT]
-
implicit abstract
def
numericAttr[V](implicit arg0: Numeric[V]): AttrValue[V]
-
implicit abstract
def
numericStyle[V](implicit arg0: Numeric[V]): StyleValue[V]
-
abstract
def
raw(s: String): RawFrag
-
abstract
val
short: AbstractShort[Builder, Output, FragT]
-
implicit abstract
def
shortFrag(v: Short): Frag[Builder, Output, FragT]
-
implicit abstract
def
stringAttr: AttrValue[String]
-
implicit abstract
def
stringFrag(v: String): Frag[Builder, Output, FragT]
-
implicit abstract
def
stringStyle: StyleValue[String]
-
abstract
val
styles: Styles
-
abstract
val
styles2: Styles2
-
abstract
val
svgStyles: SvgStyles
-
abstract
val
svgTags: SvgTags
-
abstract
val
tags: Tags
-
abstract
val
tags2: Tags2
Concrete Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
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
toAttr
, so that you can attach objects to the resultantdom.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.The type to which Attrs and Styles are applied to when the
Tag
is being rendered to give a final result.