ym.core.EventEmitter

Initialization

var eventEmitter = new ym.core.EventEmitter(nameopt, forceDebugopt);  

Constructor(nameopt, forceDebug)

Name Description Data type Default value
name The name of the class used as prefix. string ym.core.EventEmitter
forceDebug Enables or disables logging. bool false

deprecated(component, link, expirationDate) ab v3

Writes a message in the developer tool that informs about an obsolete component.

Parameter

Name Description Data type Standardwert
component The component that is marked as obsolete. function  
link The link to the documentation of the new or changed component. string  
expirationDate The date on which the component is removed. date  

emit(eventName, arguments) ab v3

Triggers an event.

Parameters

Name Description Data type Default value
eventName   string  
arguments   *  

Rückgabe

ym.core.EventEmitter

error(args) ab v3

Writes an error message in the developer tool.

Parameters

Name Description Data type Default value
args Several arguments and data types are possible.    

info(args) ab v3

Writes a message in the developer tool.

Parameters

Name Beschreibung Datentyp Default value
args Several arguments and data types are possible.    

notify(msg) ab v3

Writes a notification in the developer tool.

Name Description Data type Default value
msg Notification string  

off(eventName, handler) ab v3

Removes an event listener.

Parameters

Name Description Data type Default value
eventName   string  
handler   function  

Return

ym.core.EventEmitter

on(eventName, handler) ab v3

Adds a listener.

Parameters

Name Beschreibung Datentyp Default value
args Several arguments and data types are possible.    

Return

ym.core.EventEmitter

once(eventName, handler) ab v3

Adds a listener that reacts only to a single event.

Parameters

Name Description Data type Default value
eventName   string  
handler   function  

Return

ym.core.EventEmitter

warn(args) ab v3

Writes a warning in the developer tool.

Parameters

Name Description Data type Default value
args Several arguments and data types are possible.