clickdown
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

clickdown

npmjs - demo

Speeds up clicks by combining the speed of pointerdown and the features of click in a single "clickdown" event.

It attaches the onclickdown function to Element and HTMLElement prototypes, which means you can use it with getElementById, querySelector, and others.

Like this:

import 'clickdown'

document.getElementById('my-input').onclickdown(function (event, target) {
  console.log(event)   // PointerEvent
  console.log(target)  // <input type="..." />
})

Package Sidebar

Install

npm i clickdown

Weekly Downloads

0

Version

1.2.2

License

MIT

Unpacked Size

5.92 kB

Total Files

5

Last publish

Collaborators

  • victr