跳转到主要内容

checkEvent

Description

验证是否有处理程序分配给特定事件

checkEvent: (name: SchedulerEventName) => boolean

Parameters

  • name - (required) SchedulerEventName - 事件的名称

Returns

  • isExist - (boolean) - 如果至少有一个处理程序分配给该事件,则返回 true

Example

scheduler.attachEvent("onEventSave",function(id,data){
if (data.text.length < 20) {
alert("Text too small");
return false;
}
return true;
})
...
scheduler.checkEvent("onEventSave"); //返回 'true'
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.