Script

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

Script element with specialized methods for JavaScript

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

def `type`(scriptType: String): Script

Attributes

Source
Dom.scala
def addAttributes(attributes: Iterable[Attribute]): Script

Attributes

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

Apply modifiers (attributes and children) to this element

Apply modifiers (attributes and children) to this element

Attributes

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

Attributes

Definition Classes
Source
Dom.scala
def apply(Js: Js, modifiers: Modifier*): Script

Attributes

Source
Dom.scala
def async: Script

Attributes

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

Add or update an attribute

Add or update an attribute

Attributes

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

Attributes

Source
Dom.scala
def crossOrigin(value: String): Script

Attributes

Source
Dom.scala
def defer: Script

Attributes

Source
Dom.scala
def externalJs(url: String): Script

Attributes

Source
Dom.scala

Attributes

Source
Dom.scala
def inlineJs(code: String): Script

Attributes

Source
Dom.scala
def inlineJs(code: Js): Script

Attributes

Source
Dom.scala
def inlineResource(file: String, classLoader: ClassLoader = ...): Script

Attributes

Source
Dom.scala
def integrity(value: String): Script

Attributes

Source
Dom.scala
def javascript(code: String): Script

Attributes

Source
Dom.scala
def javascript(code: Js): Script

Attributes

Source
Dom.scala
def module(code: String): Script

Attributes

Source
Dom.scala
def module(code: Js): Script

Attributes

Source
Dom.scala

Attributes

Source
Dom.scala

Attributes

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

Remove an attribute

Remove an attribute

Attributes

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

Replace all children

Replace all children

Attributes

Source
Dom.scala
def src(url: String): Script

Attributes

Source
Dom.scala
def tag: String

Attributes

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

Add children conditionally

Add children conditionally

Attributes

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

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