Setter

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

This type represents a modifier that sets a "property" of an element.

It could be an html attribute, an event prop, or even a custom focus prop, the main constraint is that it should be idempotent, so that applying it several times in a row would produce the same effect as applying it once.

That way we can provide it to onMountSet { c => setter } and expect things to work if the element is mounted several times. However, note that CompositeKeySetter has special behaviour.

Attributes

Companion
object
Graph
Supertypes
trait Modifier[El]
class Object
trait Matchable
class Any
Known subtypes
class CompositeKeySetter[K, El]
class KeySetter[K, V, El]

Members list

Value members

Inherited 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

Inherited from:
Modifier