Document: pointerlockerror

The pointerlockerror event is fired when locking the pointer failed (for technical reasons or because the permission was denied).

Bubbles Yes
Cancelable No
Target objects Document
Interface Event
Event handler onpointerlockerror


Using addEventListener():

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

document.addEventListener('pointerlockerror', (event) => {
  console.log('Error locking pointer');

Using the onpointerlockerror event handler property:

document.onpointerlockerror = (event) => {
  console.log('Error locking pointer');

Browser compatibility

No compatibility data found. Please contribute data for "api.Document.pointerlockerror_event" (depth: 1) to the MDN compatibility data repository.

See also

Document Tags and Contributors

Contributors to this page: wbamberg, fscholz, teoli, Sheppy, ethertank, louisremi
Last updated by: wbamberg,