simulate-touch
    Overview
    Versions
    Jobs
    Chat
    Dependencies
    Contributors
    Documentation
    Alternatives
    Discussions

simulate-touch

Fire touch events when corresponding mouse events fire

1.0.0  •  Updated 4 years ago  •  by npm-dom  •  Unknown License

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.

Popularity

Stars
4

Maintenance

Development

Last ver 4 years ago
Created 6 years ago
Last commit 4 years ago
2 months between commits

Technology

Node version: 5.1.1
0 unpacked

Compliance

License Unknown
Not OSI Approved
0 vulnerabilities

Contributors

3 contributors
E.Azer Koçulu
Maintainer, 10 commits
Works at Kozmos
Josh Duff
Maintainer, 2 commits
Damon Oehlman
Maintainer
Works at ayvri
Hugh Kennedy
Maintainer
kumavis
Maintainer
Works at MetaMask
Max Ogden
Maintainer

Tags

mouse
dom
touch
event
events
Ready for the next level?
Join Openbase's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookLinkedIn
© 2020 Devstore, Inc.