ReadonlyeventsAccess the behavior's events.
Supported features as a flag object.
ReadonlylatchingLatchingSwitch
This feature is for a switch that maintains its position after being pressed (or turned).
ReadonlymomentaryMomentarySwitch
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.
ReadonlymomentaryMomentarySwitchLongPress
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.
ReadonlymomentaryMomentarySwitchMultiPress
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.
ReadonlymomentaryMomentarySwitchRelease
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.
ReadonlystateAccess the behavior's state.
ReadonlycurrentIndicates 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.
ProtectedcallbackCreate 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: {}ProtectedreactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
The implemented cluster.