new Channel(targetopt)
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 18 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
target |
+
+
+ + + +Object + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ An object that is to be transormed into an event channel. If no object is given, a new one is being created. | +
Methods
+ + + + + + +emit(type) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 259 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
type |
+
+
+ + + +String + + + + | + + + + + +The name of the event to be triggered. Any additional arguments will be passed to + the callback function. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
emitAsync(type) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 281 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
type |
+
+
+ + + +String + + + + | + + + + + +The name of the event to be triggered. Any additional arguments will be passed to + the callback function. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
emitSync(type) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 270 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
type |
+
+
+ + + +String + + + + | + + + + + +The name of the event to be triggered. Any additional arguments will be passed to + the callback function. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
isLocked(typeopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 517 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The name of the event whose status is being requested. If no event type is specified, the whole channel's status will be returned. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
isSilenced(typeopt, funcopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 477 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The name of the event whose status is being requested. + If no event type is specified, the whole channel's status will be returned. | +
func |
+
+
+ + + +function + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The function whose status is being requested. + If no function is specified the whole event type's status will be returned. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
lock(typeopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 392 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The name of the event to which no new callbacks shall be registerd. + If no event name is specified, the whole channel will be locked. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
off(typeopt, funcopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 209 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The event name of the callbacks to be removed. | +
func |
+
+
+ + + +function + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The callback function to be removed. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
on(type, func, ctxopt, asyncopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 150 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + ++ + + + + + | + + + + +The name of the event is specified by a string. It doesn't matter, + whether this event name already exists or not. | +
func |
+
+
+ + + +function + + + + | + + ++ + + + + + | + + + + +The function to be called, when the event is triggered. | +
ctx |
+
+
+ + + +Object + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optionally, you can provide a context for the callback function. | +
async |
+
+
+ + + +boolean + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ A preference regarding whether this callback shall the executed asynchronously. + (Not a guarantee!) | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
once(type, func, ctxopt, asyncopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 177 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + ++ + + + + + | + + + + +The name of the event is specified by a string. It doesn't matter, whether this event name already exists or not. | +
func |
+
+
+ + + +function + + + + | + + ++ + + + + + | + + + + +The function to be called, when the event is triggered. | +
ctx |
+
+
+ + + +Object + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optionally, you can provide a context for the callback function. | +
async |
+
+
+ + + +boolean + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ A preference regarding whether this callback shall the executed + asynchronously. (Not a guarantee!) | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
reset(typeopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 444 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The name of the event whose callbacks shall be removed. + If no event type is given, the whole channel will be reset. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
silence(Optional:, Optional:) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 297 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
Optional: |
+
+
+ + + +String + + + + | + + + + + +The name of the event that is meant to be silenced. + If no event type is specified, the whole channel will be silenced. | +
Optional: |
+
+
+ + + +function + + + + | + + + + + +The function that is no longer to be executed when the event is triggered. + If no function is specified the whole event type will be silenced. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
unlock(typeopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 423 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The name of the event that shall accept new callbacks again. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +
unsilence(typeopt, funcopt) → {Object}
+ + + + + + +-
+
+
+
- Source: +
- + multivents.js, line 350 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
type |
+
+
+ + + +String + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The name of the event that is meant to be unsilenced. | +
func |
+
+
+ + + +function + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Optional: The function that shall be executed again, after being silenced. | +
Returns:
+ + +-
+
- + Type + +
- + +Object + + + +