Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
o

DomRef

object DomRef

Constructs and exposes reusable DOM references.

Defined by scalive.DomRef. View source (scalive/api/src/scalive/DomRef.scala:13-52)

Extension methods3

attr

extension def attr(ref: DomRef$package.DomRef): Mod.Attr[Nothing]

Returns an id attribute assigning this reference to an element.

Defined by scalive.DomRef.attr. View source (scalive/api/src/scalive/DomRef.scala:48-48)

selector

extension def selector(ref: DomRef$package.DomRef): DomRef$package.DomSelector

Returns the exact ID selector for this reference, for example #settings-panel.

Defined by scalive.DomRef.selector. View source (scalive/api/src/scalive/DomRef.scala:51-51)

value

extension def value(ref: DomRef$package.DomRef): String

Returns the validated identifier as a string.

Defined by scalive.DomRef.value. View source (scalive/api/src/scalive/DomRef.scala:45-45)

Methods1

apply

def apply(value: String): DomRef$package.DomRef

Creates a DOM reference from a CSS-safe identifier.

Accepted values match [A-Za-z_][A-Za-z0-9_-]*. Invalid compile-time constants fail compilation; dynamically computed values are checked with require when this method runs. The value is used verbatim and is not trimmed or escaped.

Throws

IllegalArgumentException

if a dynamic value is empty or does not match the accepted identifier grammar

Defined by scalive.DomRef.apply. View source (scalive/api/src/scalive/DomRef.scala:25-25)