Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).

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

Bubbles Yes
Cancelable No
Interface Event
Event handler property onpointerlockchange

Examples

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');
};

Specifications

Specification Status
Pointer Lock Candidate Recommendation

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
pointerlockchange event
Experimental
Chrome Full support 45
Full support 45
No support 22 — 45
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android Full support 45
Full support 45
No support ? — 45
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 45
Full support 45
No support 25 — 45
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

See also

Метки документа и участники

Внесли вклад в эту страницу: mfuji09, mdnwebdocs-bot, wbamberg, fscholz, teoli, Sheppy, ethertank, louisremi
Обновлялась последний раз: mfuji09,