지정된 HTML 요소에서 이벤트 핸들러를 제거합니다.
node | HTMLElement | string | HTML 요소 또는 해당 ID |
event | string | 이벤트 이름 ('on' 접두어 없이) |
handler | function | 이벤트를 처리할 함수 |
options | boolean | HandlerSettings | 선택 사항, useCapture 플래그 또는 options 객체. 자세한 내용 보기 |
const handler = function(event){
console.log("event!");
};
var element = document.querySelector(".my-element");
gantt.event(element, "click", handler);
gantt.eventRemove(element, "click", handler);
event를 통해 추가된 모든 이벤트 리스너는 destructor가 호출될 때 자동으로 제거됩니다.
버전 4.0에 추가됨
Back to top