The Range.detach()
method does nothing. It used to disable the Range
object and enable the browser to release associated resources. The method has been kept for compatibility.
The Range.detach()
method does nothing. It used to disable the Range
object and enable the browser to release associated resources. The method has been kept for compatibility.
js
detach()
None.
None (undefined
).
js
const range = document.createRange(); range.selectNode(document.getElementsByTagName("div").item(0)); range.detach();
Specification |
---|
DOM Standard # dom-range-detach |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
detach |
1Starting in Chrome 37, this method is a no-op and has no effect. |
12 | 1–15Starting in Firefox 15.0, this method is a no-op and has no effect. |
9 | 9Starting in Opera 24, this method is a no-op and has no effect. |
1Since August 2015 this method is a no-op in WebKit-based browsers. |
4.4Starting in Chrome 37, this method is a no-op and has no effect. |
18Starting in Chrome 37, this method is a no-op and has no effect. |
4–15Starting in Firefox 15.0, this method is a no-op and has no effect. |
10.1Starting in Opera 24, this method is a no-op and has no effect. |
1Since August 2015 this method is a no-op in WebKit-based browsers. |
1.0Starting in Samsung Internet 3.0, this method is a no-op and has no effect. |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Range/detach