clickdown
v1.2.2
Published
Faster user interactions by combining the pointerdown and the click event in a single 'clickdown' event
Downloads
17
Maintainers
Readme
clickdown
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="..." />
})