Generic

zio.http.template2.Dom.Element.Generic
final case class Generic(tag: String, attributes: Map[String, AttributeValue] = ..., children: Vector[Dom] = ...) extends Element

Generic HTML element

Attributes

Source
Dom.scala
Graph
Supertypes
trait Element
trait Dom
trait Modifier
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Attributes

Source
Dom.scala
override def apply(modifier: Modifier, modifiers: Modifier*): Generic

Apply modifiers (attributes and children) to this element

Apply modifiers (attributes and children) to this element

Attributes

Definition Classes
Source
Dom.scala
def apply(modifiers: Iterable[Modifier]): Generic

Attributes

Source
Dom.scala
def attr(name: String, value: AttributeValue): Generic

Add or update an attribute

Add or update an attribute

Attributes

Source
Dom.scala
def attr(name: String, value: String): Generic

Attributes

Source
Dom.scala
def removeAttr(name: String): Generic

Remove an attribute

Remove an attribute

Attributes

Source
Dom.scala
def replaceChildren(children: Dom*): Generic

Replace all children

Replace all children

Attributes

Source
Dom.scala
def when(condition: Boolean)(modifiers: Modifier*): Generic

Add children conditionally

Add children conditionally

Attributes

Source
Dom.scala
def whenSome[T](option: Option[T])(f: T => Seq[Modifier]): Generic

Add children if Option is defined

Add children if Option is defined

Attributes

Source
Dom.scala

Inherited methods

def &(other: CssSelector): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def +(adjacent: CssSelector): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def >(child: CssSelector): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def >>(descendant: CssSelector): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def addAttributes(attribute: Attribute, attributes: Attribute*): Element

Attributes

Inherited from:
Element
Source
Dom.scala
def addChildren(child: Dom, children: Dom*): Element

Attributes

Inherited from:
Element
Source
Dom.scala
def addChildren(children: Iterable[Dom]): Element

Attributes

Inherited from:
Element
Source
Dom.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def collect(predicate: PartialFunction[Dom, Dom]): List[Dom]

Collect all elements matching the predicate

Collect all elements matching the predicate

Attributes

Inherited from:
Dom
Source
Dom.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def filter(predicate: Dom => Boolean): Dom

Filter children recursively based on a predicate

Filter children recursively based on a predicate

Attributes

Inherited from:
Dom
Source
Dom.scala
def find(predicate: Dom => Boolean): Option[Dom]

Find the first element matching the predicate

Find the first element matching the predicate

Attributes

Inherited from:
Dom
Source
Dom.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
Dom
Source
Dom.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def modify(element: Element): Element

Attributes

Inherited from:
Modifier
Source
Dom.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def nthChild(formula: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def part(name: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def render(indentation: Boolean): String

Render the DOM to HTML string with optional indentation

Render the DOM to HTML string with optional indentation

Attributes

Inherited from:
Dom
Source
Dom.scala
def render: String

Render the DOM to HTML string without indentation

Render the DOM to HTML string without indentation

Attributes

Inherited from:
Dom
Source
Dom.scala

Render the DOM to minified HTML string

Render the DOM to minified HTML string

Attributes

Inherited from:
Dom
Source
Dom.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def transform(f: Dom => Dom): Dom

Transform this DOM node by applying a function

Transform this DOM node by applying a function

Attributes

Inherited from:
Dom
Source
Dom.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def withAttribute(attr: String, value: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def |(other: CssSelector): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala
def ~(sibling: CssSelector): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelector.scala

Inherited fields

override val selector: CssSelector

Attributes

Inherited from:
Element
Source
Dom.scala