eventRemove
Description
Removes an event handler from an HTML element
eventRemove: (node: HTMLElement | string, event: string, handler: GanttCallback, options?: boolean | HandlerSettings) => void
Parameters
node- (required) HTMLElement | string - the HTML node or its idevent- (required) string - the name of an HTML event (without the 'on' prefix)handler- (required) function - the event handleroptions- (optional) boolean | HandlerSettings - optional, the value of either the useCapture or options parameter. Read details
Example
const handler = function(event){
console.log("event!");
};
var element = document.querySelector(".my-element");
gantt.event(element, "click", handler);
gantt.eventRemove(element, "click", handler);
Details
All event listeners attached using event will be detached automatically when the destructor is called.
Related API
Related Guides
Change log
- added in version 4.0