F2.Events Class
Handles Context passing from containers to apps and apps to apps.
src\events.js:3
Methods
Name | Description |
---|---|
emit
(
|
Execute each of the listeners that may be listening for the specified event name in order with the list of arguments. |
many
(
|
Adds a listener that will execute n times for the event before being removed. The listener is invoked only the first time the event is fired, after which it is removed. |
off
(
|
Remove a listener for the specified event. |
on
(
|
Adds a listener for the specified event |
once
(
|
Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed. |
Methods
emit
(
-
event
-
[arg]
)
Execute each of the listeners that may be listening for the specified event name in order with the list of arguments.
Parameters:
-
event
StringThe event name
-
[arg]
Object optional multipleThe arguments to be passed
many
(
-
event
-
timesToListen
-
listener
)
Adds a listener that will execute n times for the event before being removed. The listener is invoked only the first time the event is fired, after which it is removed.
Parameters:
-
event
StringThe event name
-
timesToListen
IntThe number of times to execute the event before being removed
-
listener
FunctionThe function to be fired when the event is emitted
off
(
-
event
-
listener
)
Remove a listener for the specified event.
Parameters:
-
event
StringThe event name
-
listener
FunctionThe function that will be removed
on
(
-
event
-
listener
)
Adds a listener for the specified event
Parameters:
-
event
StringThe event name
-
listener
FunctionThe function to be fired when the event is emitted
once
(
-
event
-
listener
)
Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
Parameters:
-
event
StringThe event name
-
listener
FunctionThe function to be fired when the event is emitted