events: {
off(node: HTMLElement | Document, eventName: string, callback: EventListenerCallbackType, useCapture?: boolean): void;
on(node: HTMLElement | Document, eventName: string, callback: EventListenerCallbackType, useCapture?: boolean): {
off: (() => void);
};
} = ...
Type declaration
off:function
- off(node, eventName, callback, useCapture?): void
Parameters
- node: HTMLElement | Document
- eventName: string
- callback: EventListenerCallbackType
- useCapture: boolean = false
Returns void
on:function
- on(node, eventName, callback, useCapture?): {
off: (() => void);
} Parameters
- node: HTMLElement | Document
- eventName: string
- callback: EventListenerCallbackType
- useCapture: boolean = false
Returns {
off: (() => void);
}
off 用于快速取消事件监听
取消事件监听器