Members
-
<readonly> isClosed
-
Description
True if the switch is closed (current is flowing)Returns
Details
-
<readonly> isOpen
-
Description
True if the switch is open (current is not flowing)Returns
Details
Methods
-
on( event, listener )
-
Description
Create an event listenerParameters
Name Type Description event
string The name of the event to listen for listener
function A callback to run when the event is fired. Details
-
removeListener( event, listener )
-
Description
Remove an event listenerParameters
Name Type Description event
string The name of the event that we are removing a listener from listener
function The callback that we are removing Details
-
once( event, listener )
-
Description
Create an event listener that will only fire one time.Parameters
Name Type Description event
string The name of the event to listen for listener
function A callback to run when the event is fired. Details