Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The exitPointerLock()
method asynchronously releases a pointer lock previously requested through Element.requestPointerLock
.
To track the success or failure of the request, it is necessary to listen for the pointerlockchange
and pointerlockerror
events.
Syntax
document.exitPointerLock();
Specifications
Specification | Status | Comment |
---|---|---|
Pointer Lock The definition of 'Document' in that specification. |
Candidate Recommendation | Extend the Document interface |
Browser compatibility
Desktop | Mobile | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Basic support | Chrome
Full support
Yes
| Edge Full support Yes | Firefox
Full support
50
| IE ? | Opera ? | Safari ? | WebView Android
Full support
Yes
| Chrome Android
Full support
Yes
| Edge Mobile Full support Yes | Firefox Android
Full support
50
| 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.