Modifier

com.raquo.laminar.modifiers.Modifier
See theModifier companion object
trait Modifier[-El <: Base]

This type represents an operation that has a side effect on a node of type El.

For example: href := "http://example.com" is a Modifier that sets the href attribute to an example URL when invoked on an element (typically when the element is created, or if the modifier is added after the fact using the amend method, or by manually calling its apply method).

If you choose to extend this trait, make sure to understand how to use Transaction.onStart.shared. In simple cases, wrapping your callback in it similarly to Modifier.apply below will probably work. See https://github.com/raquo/Airstream/#restarting-streams-that-depend-on-signals--signalchanges-

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Binder[El]
class EventListener[Ev, Out]
class KeyUpdater[El, K, V]
class Inserter[El]
trait Setter[El]
class CompositeKeySetter[K, El]
class KeySetter[K, V, El]
trait ChildNode[Ref]
class CommentNode
trait ReactiveElement[Ref]
class ReactiveHtmlElement[Ref]
class ReactiveSvgElement[Ref]
class TextNode
Show all

Members list

Value members

Concrete methods

def apply(element: El): Unit

You can count on this method being a no-op in your libraries and end user code.

You can count on this method being a no-op in your libraries and end user code.

The reason this method is not abstract is to avoid broken SAM sugar in case of meta modifiers. See https://github.com/raquo/scala-dom-types/issues/27

Attributes