trait
Bundle[Builder, Output <: FragT, FragT] extends Aliases[Builder, Output, FragT]
Type Members
-
type
AbstractShort = generic.AbstractShort[Builder, Output, FragT]
-
-
-
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]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
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 Aliases[Builder, Output, FragT]
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.