A JavaScript library that emulates multi-touch events on desktop browsers by translating mouse input into W3C-standard touch events.
Touch Emulator is a JavaScript library that simulates touch input on desktop browsers by converting mouse interactions into W3C-standard touch events. It solves the problem of testing touch-based web features without physical touch devices, enabling developers to debug and validate touch interactions in non-mobile environments.
Frontend developers and QA engineers building or testing web applications with touch interfaces, especially those using libraries like Hammer.js or Leaflet that rely on touch events.
Developers choose Touch Emulator for its lightweight, zero-dependency approach to accurate touch event emulation, compliance with W3C standards, and seamless integration with existing touch-aware libraries.
Emulate touch input on your desktop
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The script has no external dependencies and is simple to include via a small file, making it easy to integrate into any project without bloating it.
Generates W3C-standard touch events (touchstart, touchmove, touchend), ensuring compatibility with touch-aware libraries like Hammer.js and Leaflet, as shown in the manual tests.
Allows simulation of pinch and rotate gestures by holding the shift key, enabling basic multi-touch testing without physical devices.
Automatically prevents conflicting mouse events (e.g., mousedown, mouseover) to ensure clean touch emulation, reducing bugs in touch-based interactions.
Fails some W3C web platform tests, as admitted in the README, such as incorrect event types and object structures, which could lead to edge cases in strict environments.
Requires calling the emulator before any other touch-aware libraries, which can be error-prone in complex projects with multiple script dependencies.
The project's last referenced version is 0.0.2 in the bookmarklet, and there's no indication of recent updates, potentially lacking support for modern browser features or bug fixes.