Skip to content

UIAttribute

class

Back to Helios Web API

Kind
class
Source
src/ui/state/UIAttribute.js:26

Description

Observable UI attribute descriptor used to bind controls to Helios state.

Signature

export class UIAttribute {

Parameters

NameTypeAttributesDefaultDescription
optionsObjectAttribute descriptor.
idstringStable attribute id.
getFunctionRead callback.
setFunctionoptionalWrite 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

NameTypeAttributesDefaultDescription
valueNew write value. Omit this argument to read the current value.
contextValue passed to write.

Example


helios.write(1);

notify() → {this}

Source: src/ui/state/UIAttribute.js:59

Configures or reads notify.

Returns

This instance.

Type this

subscribe(listener, options = {})

Source: src/ui/state/UIAttribute.js:69

Configures or reads subscribe.

Parameters

NameTypeAttributesDefaultDescription
listenerValue passed to subscribe.
optionsObjectoptional{}Options object for this operation.