Readonly
eventsAccess the behavior's events.
Supported features as a flag object.
Readonly
latchingLatchingSwitch
This feature is for a switch that maintains its position after being pressed (or turned).
Readonly
momentaryMomentarySwitch
This feature is for a switch that does not maintain its position after being pressed (or turned). After releasing, it goes back to its idle position.
Readonly
momentaryMomentarySwitchLongPress
This feature is for a momentary switch that can distinguish and report long presses from short presses. When this feature flag MSL is present, MS and MSR shall be present as well.
Readonly
momentaryMomentarySwitchMultiPress
This feature is for a momentary switch that can distinguish and report double press and potentially multiple presses with more events, such as triple press, etc. When this feature flag MSM is present, MS and MSR shall be present as well.
Readonly
momentaryMomentarySwitchRelease
This feature is for a momentary switch that can distinguish and report release events. When this feature flag MSR is present, MS shall be present as well.
Readonly
stateAccess the behavior's state.
Readonly
currentIndicates the position of the switch. The valid range is zero to NumberOfPositions-1. CurrentPosition value 0 shall be assigned to the default position of the switch: for example the "open" state of a rocker switch, or the "idle" state of a push button switch.
Release resources. This is the public API for releasing application resources held by behaviors in internal state.
Protected
callbackCreate a generic callback function that has the same properties as a Reactor.
Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!
Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.
This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.
Optional
_options: {}Protected
reactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
The implemented cluster.