Modifier

trait Modifier[-El <: Base]

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

For example: attrs.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 mounted, or if the modifier is added after the fact using the amend method, or by manually calling its apply method).

We're defining a specific trait for this because we expect to have implicit conversions into this type.

Companion:
object
class Object
trait Matchable
class Any
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]
trait ReactiveElement[Ref]
class TextNode

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