Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
o

DomSelector

object DomSelector

Constructors for explicit and context-relative DOM selections.

Defined by scalive.DomSelector. View source (scalive/api/src/scalive/DomRef.scala:62-90)

Methods1

css

def css(value: String): DomRef$package.DomSelector

Creates an explicit CSS selector.

The selector must be non-empty, but is otherwise preserved verbatim: this method does not trim, parse, escape, or validate CSS syntax. Invalid syntax is therefore reported by the browser when the selector is used. Matching is performed by the consuming browser API and may select multiple elements.

Throws

IllegalArgumentException

if value is empty

Defined by scalive.DomSelector.css. View source (scalive/api/src/scalive/DomRef.scala:83-85)

Values1

current

val current: DomRef$package.DomSelector

Selects the current element according to the consuming API.

For a JS command's to parameter this is the element executing the command. For JS.push, an omitted target uses the source's normal phx-target/LiveView target resolution, and an omitted loading selector adds no targets beyond the source's normal loading state. APIs which require an explicit destination, such as portal and phx.target, reject current at runtime.

Defined by scalive.DomSelector.current. View source (scalive/api/src/scalive/DomRef.scala:71-71)