trait
Bundle[T] extends AnyRef
Type Members
-
-
-
-
-
abstract
type
RawNode <: Node
-
abstract
type
StringNode <: Node
-
-
-
-
-
-
-
abstract
type
Tag <: TypedTag[Base, T]
-
-
-
Abstract Value Members
-
implicit abstract
def
NumericNode[V](u: V)(implicit arg0: Numeric[V]): Node
-
-
-
-
abstract
val
attrs: Attrs
-
implicit abstract
def
booleanAttr: AttrValue[Boolean]
-
implicit abstract
def
booleanStyle: StyleValue[Boolean]
-
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): RawNode
-
-
implicit abstract
def
stringAttr: AttrValue[String]
-
implicit abstract
def
stringNode(v: String): Node
-
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 T. 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.