simulate-touch
Fire touch events when corresponding mouse events fire
Last updated 6 years ago by npm .
BSD · Repository · Original npm · Tarball · package.json
$ cnpm install simulate-touch 
SYNC missed versions from official npm registry.

simulate-touch

Fire touch events when corresponding mouse events fire.

  • mousedown -> touchstart
  • mousemove -> touchmove
  • mouseup -> touchend

Install

$ npm install simulate-touch

Usage

var simulateTouch = require('simulate-touch')

simulateTouch(document.body)

document.body.addEventListener('touchstart', function () {
  console.log('touch start')
})

document.body.dispatchEvent([mousedown event])
// touch started

See test.js for more info.

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

8 Versions

  • 1.0.0                                ...           5 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
  • 0.0.1-security                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 3
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |