mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-05 12:32:27 +03:00
37 lines
1.7 KiB
TypeScript
37 lines
1.7 KiB
TypeScript
export interface OnOptions {
|
|
_capture?: boolean;
|
|
_passive?: boolean;
|
|
_once?: boolean;
|
|
}
|
|
/**
|
|
* Removes the passed event listener for the passed events with the passed options.
|
|
* @param target The element from which the listener shall be removed.
|
|
* @param eventNames The eventsnames for which the listener shall be removed.
|
|
* @param listener The listener which shall be removed.
|
|
* @param capture The options of the removed listener.
|
|
*/
|
|
export declare const off: <T extends Event = Event>(target: EventTarget, eventNames: string, listener: (event: T) => any, capture?: boolean) => void;
|
|
/**
|
|
* Adds the passed event listener for the passed eventnames with the passed options.
|
|
* @param target The element to which the listener shall be added.
|
|
* @param eventNames The eventsnames for which the listener shall be called.
|
|
* @param listener The listener which is called on the eventnames.
|
|
* @param options The options of the added listener.
|
|
*/
|
|
export declare const on: <T extends Event = Event>(target: EventTarget, eventNames: string, listener: (event: T) => any, options?: OnOptions) => (() => void);
|
|
/**
|
|
* Shorthand for the stopPropagation event Method.
|
|
* @param evt The event of which the stopPropagation method shall be called.
|
|
*/
|
|
export declare const stopPropagation: (evt: Event) => void;
|
|
/**
|
|
* Shorthand for the preventDefault event Method.
|
|
* @param evt The event of which the preventDefault method shall be called.
|
|
*/
|
|
export declare const preventDefault: (evt: Event) => void;
|
|
/**
|
|
* Shorthand for the stopPropagation and preventDefault event Method.
|
|
* @param evt The event of which the stopPropagation and preventDefault methods shall be called.
|
|
*/
|
|
export declare const stopAndPrevent: (evt: Event) => void;
|