scalatags.generic

Members list

Type members

Classlikes

trait AbstractShort[Builder, Output <: FragT, FragT]

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Aggregate[Builder, Output <: FragT, FragT] extends Aliases[Builder, Output, FragT]

Attributes

Supertypes
trait Aliases[Builder, Output, FragT]
class Object
trait Matchable
class Any
Known subtypes
trait Aggregate
object all.type
object implicits.type
object short.type
trait Aggregate
object all.type
object implicits.type
object short.type
Show all
trait Aliases[Builder, Output <: FragT, FragT]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Aggregate[Builder, Output, FragT]
trait Aggregate
object all.type
object implicits.type
object short.type
trait Aggregate
object all.type
object implicits.type
object short.type
trait Bundle[Builder, Output, FragT]
object Text.type
trait VirtualDom[Output, FragT]
Show all
trait AnchorElementAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, FragT]

Attributes

Supertypes
trait Util[Builder, Output, FragT]
trait LowPriUtil[Builder, Output, FragT]
class Object
trait Matchable
class Any
Known subtypes
trait Attrs[Builder, Output, FragT]
case class Attr(name: String, namespace: Option[Namespace], raw: Boolean)

Wraps up a HTML attribute in a value which isn't a string.

Wraps up a HTML attribute in a value which isn't a string.

Value parameters

name

the name of this particular attribute

namespace

an XML Namespace that this attribute lives in

raw

all Attrs are checked to fail fast if their names are invalid XML attrs; flagging them as raw disables the checks in the few cases you actually want invalid XML attrs (e.g. AngularJS)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class AttrPair[Builder, T](a: Attr, v: T, ev: AttrValue[Builder, T]) extends Modifier[Builder]

An Attr, it's associated value, and an AttrValue of the correct type

An Attr, it's associated value, and an AttrValue of the correct type

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Modifier[Builder]
class Object
trait Matchable
class Any
Show all
trait AttrValue[Builder, T]

Used to specify how to handle a particular type T when it is used as the value of a Attr. Only types with a specified AttrValue may be used.

Used to specify how to handle a particular type T when it is used as the value of a Attr. Only types with a specified AttrValue may be used.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Attrs[Builder, Output <: FragT, FragT] extends InputAttrs[Builder, Output, FragT], ClipboardEventAttrs[Builder, Output, FragT], MediaEventAttrs[Builder, Output, FragT], MiscellaneousEventAttrs[Builder, Output, FragT], KeyboardEventAttrs[Builder, Output, FragT], MouseEventAttrs[Builder, Output, FragT], WindowEventAttrs[Builder, Output, FragT], FormEventAttrs[Builder, Output, FragT], AnchorElementAttrs[Builder, Output, FragT]

Trait containing the contents of the Attrs module, so they can be mixed in to other objects if needed. This should contain "all" attributes and mix in other traits (defined above) as needed to get full coverage.

Trait containing the contents of the Attrs module, so they can be mixed in to other objects if needed. This should contain "all" attributes and mix in other traits (defined above) as needed to get full coverage.

Attributes

Supertypes
trait AnchorElementAttrs[Builder, Output, FragT]
trait FormEventAttrs[Builder, Output, FragT]
trait WindowEventAttrs[Builder, Output, FragT]
trait MouseEventAttrs[Builder, Output, FragT]
trait KeyboardEventAttrs[Builder, Output, FragT]
trait MiscellaneousEventAttrs[Builder, Output, FragT]
trait MediaEventAttrs[Builder, Output, FragT]
trait SharedEventAttrs[Builder, Output, FragT]
trait ClipboardEventAttrs[Builder, Output, FragT]
trait InputAttrs[Builder, Output, FragT]
trait GlobalAttrs[Builder, Output, FragT]
trait Util[Builder, Output, FragT]
trait LowPriUtil[Builder, Output, FragT]
class Object
trait Matchable
class Any
Show all
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.

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.

Type parameters

Builder

The type to which Attrs and Styles are applied to when the Tag is being rendered to give a final result.

Attributes

Supertypes
trait Aliases[Builder, Output, FragT]
class Object
trait Matchable
class Any
Known subtypes
object Text.type
trait VirtualDom[Output, FragT]
trait ClipboardEventAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, FragT]

Clipboard Events

Clipboard Events

Attributes

Supertypes
trait Util[Builder, Output, FragT]
trait LowPriUtil[Builder, Output, FragT]
class Object
trait Matchable
class Any
Known subtypes
trait Attrs[Builder, Output, FragT]
trait FormEventAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, FragT]

Form Events that are triggered by actions inside an HTML form. However, these events apply to almost all HTML elements but are most commonly used in form elements.

Form Events that are triggered by actions inside an HTML form. However, these events apply to almost all HTML elements but are most commonly used in form elements.

Attributes

Supertypes
trait Util[Builder, Output, FragT]
trait LowPriUtil[Builder, Output, FragT]
class Object
trait Matchable
class Any
Known subtypes
trait Attrs[Builder, Output, FragT]
trait Frag[Builder, +FragT] extends Modifier[Builder]

Marker sub-type of scalatags.generic.Modifier which signifies that that type can be rendered as a standalone fragment of FragT. This excludes things like scalatags.generic.AttrPairs or scalatags.generic.StylePairs which only make sense as part of a parent fragment

Marker sub-type of scalatags.generic.Modifier which signifies that that type can be rendered as a standalone fragment of FragT. This excludes things like scalatags.generic.AttrPairs or scalatags.generic.StylePairs which only make sense as part of a parent fragment

Attributes

Supertypes
trait Modifier[Builder]
class Object
trait Matchable
class Any
Known subtypes
trait TypedTag[Builder, Output, FragT]
class TypedTag[Output]
class TypedTag[O]
trait Frag
class RawFrag
class StringFrag
trait Frag[Output, FragT]
class RawFrag
class StringFrag
Show all
trait GlobalAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, FragT]

A trait for global attributes that are applicable to any HTML5 element. All traits that define Attrs should derive from this trait since all groupings of attributes should include these global ones.

A trait for global attributes that are applicable to any HTML5 element. All traits that define Attrs should derive from this trait since all groupings of attributes should include these global ones.

Attributes

Supertypes
trait Util[Builder, Output, FragT]
trait LowPriUtil[Builder, Output, FragT]
class Object
trait Matchable
class Any
Known subtypes
trait InputAttrs[Builder, Output, FragT]
trait Attrs[Builder, Output, FragT]
trait InputAttrs[Builder, Output <: FragT, FragT] extends GlobalAttrs[Builder, Output, FragT]

Attributes applicable only to the input element. This set is broken out because it may be useful to identify the attributes of the input element separately from other groupings. The attributes permitted by the input element are likely the most complex of any element in HTML5.

Attributes applicable only to the input element. This set is broken out because it may be useful to identify the attributes of the input element separately from other groupings. The attributes permitted by the input element are likely the most complex of any element in HTML5.

Attributes

Supertypes
trait GlobalAttrs[Builder, Output, FragT]
trait Util[Builder, Output, FragT]
trait LowPriUtil[Builder, Output, FragT]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Attrs[Builder, Output, FragT]
trait KeyboardEventAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, FragT]

Keyboard Events - triggered by user action son the keyboard or similar user actions

Keyboard Events - triggered by user action son the keyboard or similar user actions

Attributes

Supertypes
trait Util[Builder, Output, FragT]
trait LowPriUtil[Builder, Output, FragT]
class Object
trait Matchable
class Any
Known subtypes
trait Attrs[Builder, Output, FragT]
trait LowPriUtil[Builder, Output <: FragT, FragT]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Util[Builder, Output, FragT]
trait AnchorElementAttrs[Builder, Output, FragT]
trait Attrs[Builder, Output, FragT]
trait ClipboardEventAttrs[Builder, Output, FragT]
trait FormEventAttrs[Builder, Output, FragT]
trait GlobalAttrs[Builder, Output, FragT]
trait InputAttrs[Builder, Output, FragT]
trait KeyboardEventAttrs[Builder, Output, FragT]
trait MouseEventAttrs[Builder, Output, FragT]
trait SharedEventAttrs[Builder, Output, FragT]
trait MediaEventAttrs[Builder, Output, FragT]
trait MiscellaneousEventAttrs[Builder, Output, FragT]
trait WindowEventAttrs[Builder, Output, FragT]
trait StyleMisc[Builder, Output, FragT]
trait Styles[Builder, Output, FragT]
trait Styles2[Builder, Output, FragT]
trait SvgAttrs[Builder, Output, FragT]
trait SvgTags[Builder, Output, FragT]
trait SvgTags
object svgTags.type
trait SvgTags[Output, FragT]
object svgTags.type
trait Tags[Builder, Output, FragT]
trait Tags
object all.type
object short.type
object tags.type
trait Tags[Output, FragT]
object all.type
object short.type
object tags.type
trait Tags2[Builder, Output, FragT]
trait Tags2
object tags2.type
trait Tags2[Output, FragT]
object tags2.type
trait TagFactory
trait Cap
object attrs.type
object *.type
object styles.type
object styles2.type
object svgAttrs.type
trait TagFactory[Output, FragT]
trait Cap
object attrs.type
object *.type
object styles.type
object styles2.type
object svgAttrs.type
Show all
trait MediaEventAttrs[Builder, Output <: FragT, FragT] extends SharedEventAttrs[Builder, Output, FragT]

Media Events - triggered by media like videos, images and audio. These apply to all HTML elements, but they are most common in media elements, like