Class IYYCommon
公共功能原型类,提供比如事件的侦听,取消侦听等公共功能。
Defined in: yyapi.js.
Constructor Attributes | Constructor Name and Description |
---|---|
IYYCommon 接口。
|
Method Attributes | Method Name and Description |
---|---|
addEventListener(eventType, listenerFunc)
增加侦听事件。
|
|
removeEventListener(eventType, listenerFunc)
删除侦听事件。即删除指定事件的所有侦听函数。
|
Method Detail
addEventListener(eventType, listenerFunc)
增加侦听事件。
- Parameters:
- {string} eventType
- 事件的类型key,比如: IYY.ACTIVE,IYYChannel.CHANNEL_INFO_CHANGED
- {function} listenerFunc
- 事件的侦听函数。
removeEventListener(eventType, listenerFunc)
删除侦听事件。即删除指定事件的所有侦听函数。
- Parameters:
- {string} eventType
- 事件的类型。
- {function} listenerFunc
- 要删除的事件的侦听函数。