Document: pointerlockchange

The pointerlockchange event is fired when the pointer is locked/unlocked.

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


Using addEventListener():

document.addEventListener('pointerlockchange', (event) => {
  console.log('Pointer lock changed');

Using the onpointerlockchange event handler property:

document.onpointerlockchange = (event) => {
  console.log('Pointer lock changed');

Browser compatibility

No compatibility data found. Please contribute data for "api.Document.pointerlockchange_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,