Attributes
Members list
Type members
Classlikes
A table cell (<th> or <td>), accepted as an element child of tr(...).
A table cell (<th> or <td>), accepted as an element child of tr(...).
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
A generic HTML element.
A generic HTML element.
Represents any standard HTML tag (e.g., "div", "p", "span"). Text content in children is HTML-escaped during rendering.
Equality is structural across all Element implementations: a Generic equals any other element with the same tag, attributes, children, and text-escaping semantics, regardless of the concrete class (e.g., Generic("li", ...) equals the equivalent LiElement).
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes
- tag
-
the element tag name (e.g., "div", "h1")
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
An `
An `
list item, accepted as an element child oful(...)andol(...). Produced by theli(...)` factory.
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class LiElement
An `
An `
- ` list item element.
Equality is structural across all Element implementations, so a LiElement equals a Generic("li", ...) with the same attributes and children.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Litrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
An `` element, accepted as an element child of select(...) and optgroup(...). Produced by the opt(...)/option(...) DSL factories.
An `` element, accepted as an element child of select(...) and optgroup(...). Produced by the opt(...)/option(...) DSL factories.
Attributes
- Source
- Dom.scala
- Supertypes
-
trait SelectChildtrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class OptElement
An `` element.
An `` element.
Equality is structural across all Element implementations, so an OptElement equals a Generic("option", ...) with the same attributes and children.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Opttrait SelectChildtrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
An `` element, accepted as an element child of select(...). Produced by the optgroup(...) factory.
An `` element, accepted as an element child of select(...). Produced by the optgroup(...) factory.
Attributes
- Source
- Dom.scala
- Supertypes
-
trait SelectChildtrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class OptgroupElement
An `` element.
An `` element.
Unlike the other typed elements, this class intentionally does not override apply(DomModifier*), and withChildren returns a plain Element, so replacing children drops the Optgroup marker — children belong in the optgroup(...) factory, which enforces that restriction at compile time. Attributes can still be attached via withAttributes, preserving the marker.
Equality is structural across all Element implementations, so an OptgroupElement equals a Generic("optgroup", ...) with the same attributes and children.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes (`` elements only)
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Optgrouptrait SelectChildtrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
An HTML script element.
An HTML script element.
The Script element renders its children WITHOUT HTML-escaping, allowing inline JavaScript to be rendered as-is. Provides convenience methods inlineJs(code) to inject escaped JavaScript or externalJs(url) to link external scripts.
Equality is structural across all Element implementations, including the text-escaping semantics: because Script renders its children unescaped, it never equals an equally-shaped Generic("script", ...), whose children would be escaped on render.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes (typically Text with JavaScript code)
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
An or, accepted as an element child of select(...).
An or, accepted as an element child of select(...).
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
An HTML style element.
An HTML style element.
The Style element renders its children WITHOUT HTML-escaping, allowing inline CSS to be rendered as-is. Provides convenience method inlineCss(code) to inject CSS code directly.
Equality is structural across all Element implementations, including the text-escaping semantics: because Style renders its children unescaped, it never equals an equally-shaped Generic("style", ...), whose children would be escaped on render.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes (typically Text with CSS code)
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A <td> data cell, accepted as an element child of tr(...). Produced by the td(...) factory.
A <td> data cell, accepted as an element child of tr(...). Produced by the td(...) factory.
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Celltrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class TdElement
A <td> table data cell element.
A <td> table data cell element.
Equality is structural across all Element implementations, so a TdElement equals a Generic("td", ...) with the same attributes and children.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Tdtrait Celltrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A <th> header cell, accepted as an element child of tr(...). Produced by the th(...) factory.
A <th> header cell, accepted as an element child of tr(...). Produced by the th(...) factory.
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Celltrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ThElement
A <th> table header cell element.
A <th> table header cell element.
Equality is structural across all Element implementations, so a ThElement equals a Generic("th", ...) with the same attributes and children.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Thtrait Celltrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A <tr> table row, accepted as an element child of table(...). Produced by the tr(...) factory.
A <tr> table row, accepted as an element child of table(...). Produced by the tr(...) factory.
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class TrElement
A <tr> table row element.
A <tr> table row element.
Unlike permissive elements (li, th, td), this class intentionally keeps the row content model intact: it does not override apply(DomModifier*), and withChildren returns a plain Element, so replacing children drops the Tr marker — children belong in the tr(...) factory, which enforces the restriction at compile time. Attributes can still be attached via withAttributes, preserving the marker.
Equality is structural across all Element implementations, so a TrElement equals a Generic("tr", ...) with the same attributes and children.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes (
<th>/<td>cells only)
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Trtrait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A sealed trait for void HTML elements that cannot have children.
A sealed trait for void HTML elements that cannot have children.
Void elements accept attributes but reject children at compile time. They self-close when rendered (e.g., ``, <img src="../..."/>).
Unlike Element, this trait does not extend Dom.Element so it does not inherit apply(DomModifier*) — only attributes can be applied via apply(Attribute, Attribute*).
Subtypes include:
- Dom.Element.VoidGeneric — generic void elements
Attributes
- Source
- Dom.scala
- Supertypes
-
trait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class VoidGeneric
A generic void HTML element.
A generic void HTML element.
Represents any void HTML tag (e.g., "br", "img", "input"). Only accepts attributes, not children — enforced at compile time.
Value parameters
- attributes
-
attribute key-value pairs
- tag
-
the element tag name (e.g., "br", "img")
Attributes
- Source
- Dom.scala
- Supertypes
-
trait Voidtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Inherited and Abstract types
The names of the product elements.
The name of the type.