A signal instance that returns the current value when called as a function.
Members
Methods
add(listener, onceopt, immediateopt) → {Slot}
Add listener to signal
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
listener |
function
|
The listener to be executed when the signal dispatches | ||
once |
boolean
|
<optional> |
false | Executes the listener only once when set to true |
immediate |
boolean
|
<optional> |
false | Executes the listener immediately with current state |
Returns:
- Type:
-
Slot
addOnce(listener) → {Slot}
Add listener to signal
Parameters:
Name | Type | Description |
---|---|---|
listener |
function
|
The listener to be executed when the signal dispatches |
Returns:
- Type:
-
Slot