View Source Tamnoon.DOM.Actions.ToggleAttribute (Tamnoon v1.0.0-rc.3)

An action that will toggle :attribute attribute of the :target node. An additional argument :force_to can also be provided in order to force the value as true or false.

Summary

Functions

Returns whether the argument is a Tamnoon.DOM.Actions.ToggleAttribute.t/0, or a map with the necessary properties to construct one (via new!/1).

Constructs a Tamnoon.DOM.Actions.SetValue.t/0 with the following arguments

Types

@type t() :: %Tamnoon.DOM.Actions.ToggleAttribute{
  attribute: String.t(),
  force_to: boolean() | nil,
  target: Tamnoon.DOM.Node.t()
}

Functions

@spec is_valid?(action_args :: any()) :: boolean()

Returns whether the argument is a Tamnoon.DOM.Actions.ToggleAttribute.t/0, or a map with the necessary properties to construct one (via new!/1).

@spec new!(action_args :: term()) :: %Tamnoon.DOM.Actions.ToggleAttribute{
  attribute: term(),
  force_to: term(),
  target: term()
}

Constructs a Tamnoon.DOM.Actions.SetValue.t/0 with the following arguments: