Events Class
Events Provider.
Can function either as a standalone or a Mixin
Constructor
Events
-
el
Parameters:
-
el
Elementelement to use as event target. Optional
Item Index
Methods
- addEvent
- addEvent
- addEventOnce
- addEventOnce
- addEvents
- addEvents
- Events.createEvent static
- Events.createEvent static
- Events.removeOn static
- Events.removeOn static
- fireEvent
- fireEvent
- fireLatchedEvent
- fireLatchedEvent
- getPseudo static
- getPseudo static
- processType static
- processType static
- removeEvent
- removeEvent
Methods
addEvent
-
the
-
a
Adds an event
addEvent
-
the
-
a
Adds an event
addEventOnce
-
the
-
a
Adds an event for one execution, then removes it
addEventOnce
-
the
-
a
Adds an event for one execution, then removes it
addEvents
-
literal
Helper to add multiple events at once
Parameters:
-
literal
Objectobject of event types => callbacks
addEvents
-
literal
Helper to add multiple events at once
Parameters:
-
literal
Objectobject of event types => callbacks
Events.createEvent
-
type
-
dispatcher
-
args
cross-browser function to create event object for fire method
Created object will always have following properties: - dispatcher: a reference to dispatching object (since we can't use 'this') - args: arguments passed alongside the event - object_event: a flag set to true to easily check if this is an object event or a normal DOM event.
Returns:
Events.createEvent
-
type
-
dispatcher
-
args
cross-browser function to create event object for fire method
Created object will always have following properties: - dispatcher: a reference to dispatching object (since we can't use 'this') - args: arguments passed alongside the event - object_event: a flag set to true to easily check if this is an object event or a normal DOM event.
Returns:
Events.removeOn
-
type
removes the on* prefix from event names
Parameters:
-
type
String
Returns:
Events.removeOn
-
type
removes the on* prefix from event names
Parameters:
-
type
String
Returns:
fireEvent
-
event
-
arguments
dispatches an event
Parameters:
-
event
Stringtype
-
arguments
Mixedto pass with the event
fireEvent
-
event
-
arguments
dispatches an event
Parameters:
-
event
Stringtype
-
arguments
Mixedto pass with the event
fireLatchedEvent
-
the
-
arguments
Fires a latched event
Parameters:
-
the
Stringevent type
-
arguments
Mixedto pass with the event
fireLatchedEvent
-
the
-
arguments
Fires a latched event
Parameters:
-
the
Stringevent type
-
arguments
Mixedto pass with the event
getPseudo
-
type
returns a structured data object about a type's pseudo-events
Parameters:
-
type
String
Returns:
getPseudo
-
type
returns a structured data object about a type's pseudo-events
Parameters:
-
type
String
Returns:
processType
-
type
proccesses an event type, returning a valid data object from that name
Parameters:
-
type
String
Returns:
processType
-
type
proccesses an event type, returning a valid data object from that name
Parameters:
-
type
String
Returns:
removeEvent
-
event
-
function
removes a function from an event