new Signal(host, name)
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
host |
object |
<nullable> |
If hosted, you can identify the host here. |
name |
string |
<nullable> |
The name of the signal |
- Source:
Methods
-
has(listener, listenerContext)
-
Check if listener was attached to Signal.
Parameters:
Name Type Argument Description listenerfunction The function to check
listenerContextobject <nullable>
The context that was bound
- Source:
Returns:
- Type
- boolean
-
off(listener, listenerContext)
-
Unbinds a listener to a signal.
Parameters:
Name Type Argument Description listenerfunction The function to unbind
listenerContextobject <nullable>
The context that was bound
- Source:
Returns:
- Type
- function
-
on(listener, listenerContext, priority)
-
Ties a listener to a signal.
Parameters:
Name Type Argument Description listenerfunction The function to call when the signal is raised
listenerContextobject <nullable>
A context to set for the listener. The event host may set a default for this value, but you may override that here.
prioritynumber <nullable>
A priority for the listener.
- Source:
Returns:
- Type
- SignalBinding
-
once(listener, listenerContext, priority)
-
Ties a listener to for a signal for one execution.
Parameters:
Name Type Argument Description listenerfunction The function to call when the signal is raised
listenerContextobject <nullable>
A context to set for the listener. The event host may set a default for this value, but you may override that here.
prioritynumber <nullable>
A priority for the listener.
- Source:
Returns:
- Type
- SignalBinding
-
toString()
-
Strings!
- Source: