Document.releaseCapture()
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
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
releaseCapture |
No |
No |
4 |
5 |
No |
No |
No |
No |
4 |
No |
No |
No |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/releaseCapture