CompositeKeySetter

class CompositeKeySetter[K <: Key, -El <: Base](val key: CompositeKey[K, El], val itemsToAdd: List[String], val itemsToRemove: List[String]) extends Setter[El]

This is like KeySetter, but for composite attributes like cls and role.

CompositeKeySetter can not be a subtype of KeySetter because we can not implement val value – the actual value to be set is dynamic, depending on the current value of the element's composite attribute.

Also, if you call cls := "class2" after calling cls := "class1", you end up with two classes instead of just "class2", which is different fro KeySetter semantics.

Note: for dynamic subscriptions (<--), we use KeyUpdater for all keys including composite attributes.

trait Setter[El]
trait Modifier[El]
class Object
trait Matchable
class Any

Value members

Concrete methods

override 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

Definition Classes

Concrete fields

val itemsToAdd: List[String]
val itemsToRemove: List[String]
val key: CompositeKey[K, El]