跳到主要内容

checkEvent

Description

检查事件是否已指定一个或多个处理程序

checkEvent: (name: string) => boolean

Parameters

  • name - (必填) string - 事件的名称

Returns

  • isExist - (boolean) - 返回 true,如果为事件指定了一个或多个处理程序

Example

gantt.attachEvent("onTaskClick", function(id, e) {
alert("You've just clicked an item with id="+id);
});

gantt.checkEvent("onTaskClick"); //返回 '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.