UNPKG

leaflet

Version:

JavaScript library for mobile-friendly interactive maps

36 lines (35 loc) • 1.48 kB
/** @type {WeakSet<Event>} */ export declare const stoppedEvents: WeakSet<Event>; /** @type {WeakSet<Node>} */ export declare const clickDisabledElements: WeakSet<Node>; /** @type {WeakSet<EventTarget>} */ export declare const mapHandlingDisabled: WeakSet<EventTarget>; /** * @param {Node | null} el * @param {EventTarget | null} container */ export declare function isClickDisabled(el: Node | null, container: EventTarget | null): boolean; /** * Enables pointer detection and capture for the document. * @param {HTMLElement} el */ export declare function enablePointerDetection(el: HTMLElement): void; /** * Disables pointer detection and capture for the document. * @param {HTMLElement} el */ export declare function disablePointerDetection(el: HTMLElement): void; /** Returns the pointers that are currently active on the document. */ export declare function getPointers(): PointerEvent[]; /** * Fires a `dblclick` on double tap where the browser doesn't (like iOS Safari), which is where it always reports * `detail: 1` on clicks (see #7012). The pointer type comes from `pointerdown`, because iOS Safari reports `mouse` * on clicks from touch (WebKit bug 282988). * @param {MouseEvent} e */ export declare function simulateDblclick(e: MouseEvent): void; /** * Makes Space click a `role="button"` link like it clicks a native button (Enter already clicks links natively). * @param {HTMLElement} el */ export declare function clickOnSpace(el: HTMLElement): void;