Nasi wolontariusze nie przetłumaczyli jeszcze tego artykułu na język Polski. Dołącz do nas i pomóż go przetłumaczyć!
Można także przeczytać artykuł w języku: English (US).
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The Element.requestPointerLock()
method lets you asynchronously ask for the pointer to be locked on the given element.
To track the success or failure of the request, it is necessary to listen for the pointerlockchange
and pointerlockerror
events at the Document
level.
Syntax
instanceOfElement.requestPointerLock();
Specifications
Specification | Status | Comment |
---|---|---|
Pointer Lock The definition of 'Element' in that specification. |
Candidate Recommendation | Extend the Element interface |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Basic support | Chrome
Full support
Yes
| Edge Full support Yes | Firefox
Full support
50
| IE ? | Opera ? | Safari Full support 10 | WebView Android
Full support
Yes
| Chrome Android
Full support
Yes
| Edge Mobile Full support Yes | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.