- Source:
- Tutorials:
- See:
Methods
(static) fire(eventName, optionsopt) → {Self}
Fires event with an optional options object
用可选的options对象触发事件
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eventName |
String | Event name to fire事件名称触发 | |
options |
Object |
<optional> |
Options object选择对象 |
Returns:
thisArg
- Type
- Self
off(eventName, handler) → {Self}
Stops event observing for a particular event handler. Calling this method
without arguments removes all handlers for all events
停止特定事件处理程序的事件观察。调用这个方法
不带参数将删除所有事件的所有处理程序
Parameters:
Name | Type | Description |
---|---|---|
eventName |
String | Object | Event name (eg. 'after:render') or object with key/value pairs (eg. {'after:render': handler, 'selection:cleared': handler})事件名称(如:'后:渲染')或对象与键/值对(例如。{'after:render': handler, 'selection:cleared': handler}) |
handler |
function | Function to be deleted from EventListeners从EventListeners中删除的函数 |
Returns:
thisArg
- Type
- Self
on(eventName, handler) → {Self}
Observes specified event
观察指定事件
Parameters:
Name | Type | Description |
---|---|---|
eventName |
String | Object | Event name (eg. 'after:render') or object with key/value pairs (eg. {'after:render': handler, 'selection:cleared': handler})事件名称(如:'后:渲染')或对象与键/值对(例如。{'after:render': handler, 'selection:cleared': handler}) |
handler |
function | Function that receives a notification when an event of the specified type occurs函数,该函数在发生指定类型的事件时接收通知 |
Returns:
thisArg
- Type
- Self