convert-mouse-to-touch

1.0.2 • Public • Published

ConvertMouseToTouch

Usage

npm install convert-mouse-to-touch

UMD Support

const ConvertMouseToTouch = require('convert-mouse-to-touch');
ConvertMouseToTouch.init();

or

<script src="dist/index.js"></script>
<script>
  ConvertMouseToTouch.init();
</script> 

Description

Listen mousedown,mousemouse,mousedown event from window and covert those event to touch event and dispatch to the event.target.

Feature

  • support chrome emulated devices (Won't trigger touchevent twice)
  • TouchEvent,Touch polyfill

Readme

Keywords

none

Package Sidebar

Install

npm i convert-mouse-to-touch

Weekly Downloads

10

Version

1.0.2

License

MIT

Unpacked Size

11.8 kB

Total Files

11

Last publish

Collaborators

  • qqminiprogram