Input Class
The base Input object, holds common functions and properties between input types
Constructor
Methods
emit
(
Mixed
chainable
-
type
-
data
Emits an event which will run all registered listeners for the event type
Parameters:
-
type
StringThe event name to emit
-
data
MixedAny data you want passed along with the event
Returns:
Mixed:
Returns itself.
off
(
Mixed
chainable
-
type
-
listener
Removes a listener function for an event type
Parameters:
-
type
StringThe event name to emit
-
listener
FunctionThe function to remove
Returns:
Mixed:
Returns itself.
on
(
Mixed
chainable
-
type
-
listener
Registers a listener function to be run on an event occurance
Parameters:
-
type
StringThe event name to listen for
-
listener
FunctionThe function to execute when the event happens
Returns:
Mixed:
Returns itself.
once
(
Mixed
chainable
-
type
-
listener
Registers a one-time callback for an event
Parameters:
-
type
StringThe event name to listen for
-
listener
Functionthe callback to call when the event occurs
Returns:
Mixed:
Returns itself.