Range.selectNodeContents()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
Range.selectNodeContents()
는 Node
의 내용을 포함하는 Range
를 설정합니다.
부모 Node
의 start, end 값이 Reference가 됩니다. startOffset
은 0이고, endOffset
은 Child Node의 수 혹은 Reference Node에 포함되어 있는 Child Node의 수가 됩니다.
구문
js
range.selectNodeContents(referenceNode);
매개변수
예제
js
range = document.createRange();
referenceNode = document.getElementsByTagName("div")[0];
range.selectNodeContents(referenceNode);
명세
Specification |
---|
DOM # dom-range-selectnodecontents |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
selectNodeContents |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.