跳转到主要内容

detachEvent

Description

移除之前通过 attachEvent 方法添加的事件处理程序

detachEvent: (id: string) => void

Parameters

  • id - (required) string - 事件处理程序的标识符

Example

var myEvent = scheduler.attachEvent("onClick", function (id){
...//事件处理代码
});
...
scheduler.detachEvent(myEvent);

Details

通过 event 添加的任何事件监听器在调用 destructor 时会被自动移除。

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.