The releaseCapture()
method releases mouse capture if it's currently enabled on an element within this document. Enabling mouse capture on an element is done by calling element.setCapture()
.
Syntax
document.releaseCapture();
Once mouse capture is released, mouse events will no longer all be directed to the element on which capture is enabled.
Example
See the example for element.setCapture()
.
Specifications
Based on Internet Explorer's implementation.
Browser compatibility
The compatibility table on 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.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
releaseCapture | Chrome No support No | Edge No support No | Firefox Full support Yes | IE ? | Opera ? | Safari ? | WebView Android No support No | Chrome Android No support No | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android No support No |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Non-standard. Expect poor cross-browser support.
- Non-standard. Expect poor cross-browser support.