I volontari di MDN non hanno ancora tradotto questo articolo in Italiano. Unisciti a noi e traducilo tu stesso.
Puoi anche consultare l’articolo in English (US).

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

Bubbles Yes
Cancelable No
Interface Event
Event handler property onpointerlockerror

Examples

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

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
pointerlockerror 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

Tag del documento e collaboratori

Hanno collaborato alla realizzazione di questa pagina: mdnwebdocs-bot, mfuji09, wbamberg, fscholz, teoli, Sheppy, ethertank, louisremi
Ultima modifica di: mdnwebdocs-bot,