HTMLElement: pointerdown event

The pointerdown event is fired when a pointer becomes active. For mouse, it is fired when the device transitions from no buttons depressed to at least one button depressed. For touch, it is fired when physical contact is made with the digitizer. For pen, it is fired when the stylus makes physical contact with the digitizer.

Bubbles Yes
Cancelable Yes
Interface PointerEvent
Event handler property onpointerdown

Examples

Using addEventListener():

const para = document.querySelector('p');

para.addEventListener('pointerdown', (event) => {
  console.log('Pointer down event');
});

Using the onpointerdown event handler property:

const para = document.querySelector('p');

para.onpointerdown = (event) => {
  console.log('Pointer down event');
};

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
pointerdown_event
55
12
12-79
59
29
11
10
42
13
55
55
79
29
42
13
6.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointerdown_event