UIAttribute
class
- Kind
- class
- Source
- src/ui/state/UIAttribute.js:26
Description
Observable UI attribute descriptor used to bind controls to Helios state.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | Attribute descriptor. | ||
id | string | Stable attribute id. | ||
get | Function | Read callback. | ||
set | Function | optional | Write callback. |
Utilities
Additional public helpers that do not belong to a narrower API area.
value()
Source: src/ui/state/UIAttribute.js:49
Configures or reads value.
write(value, context)
Source: src/ui/state/UIAttribute.js:53
Configures or reads write.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | New write value. Omit this argument to read the current value. | |||
context | Value passed to write. |
Example
helios.write(1);
notify() → {this}
Source: src/ui/state/UIAttribute.js:59
Configures or reads notify.
Returns
This instance.
Typethissubscribe(listener, options = {})
Source: src/ui/state/UIAttribute.js:69
Configures or reads subscribe.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
listener | Value passed to subscribe. | |||
options | Object | optional | {} | Options object for this operation. |