Track Mouse and Touch Events
const evts = [
'touchstart', 'touchmove', 'touchend',
'mousedown', 'mousemove', 'mouseup',
'click', 'mousenter', 'mouseleave'
]
evts.forEach(type => {
document.addEventListener(type, e => {
console.log('event: ', type)
})
})
See which mouse events are able to fire on the document.
I used this recently when fixing some issues with Android Talkback. Screenreaders will swallow mouse events in some cases.
You can add pointer events too if you need them…