v7.3.0

EventHelper

A static utility class for adding, removing, and normalizing DOM events across browsers. It provides a unified API for mouse, touch, and pointer events via on and handles event delegation, throttling, expiration, and auto-detaching of listeners.

const detacher = EventHelper.on({
    element : myElement,
    click   : 'onClick',
    thisObj : myWidget
});

// Remove listeners later detacher();

Useful functions

Function Description
on Add DOM event listeners with options
getXY Get [x, y] coordinates from an event
getPagePoint Get a page-level Point from an event

See also

No results

Properties

Properties are getters/setters or publicly accessible variables on this class
  • dblClickTime : Number300
    READONLY
    static

    The time in milliseconds within which a second touch tap event triggers a dblclick event.

  • eventNameMap : Object
    internal
    READONLY
    static

    DOM event to trigger name mapping.

  • longPressTime : Number700
    READONLY
    static

    The time in milliseconds for a taphold gesture to trigger a contextmenu event.

    Functions

    Functions are methods available for calling on the class

      Type definitions

      Source path

      Core/helper/EventHelper.js

      Contents