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
- ElementListenerConfig - Options for adding listeners
- DomHelper - DOM element utilities
No results
Properties
Properties are getters/setters or publicly accessible variables on this class-
The time in milliseconds within which a second touch tap event triggers a
dblclickevent. -
DOM event to trigger name mapping.
-
The time in milliseconds for a
tapholdgesture to trigger acontextmenuevent.