Roughly, You can think Pointer Events as a combination of Mouse and Touch events.
document.addEventListener('mousedown', () => {
// do something on mousedown
});
document.addEventListener('touchstart', () => {
// do something on touchstart
});
same as below
document.addEventListener('pointerdown', () => {
// do something on mousedown or touchstart
});
Reference:
Read more:
Top comments (0)