Baseline Widely available
The Range.selectNode()
method sets the Range
to contain the Node
and its contents. The parent Node
of the start and end of the Range
will be the same as the parent of the referenceNode.
selectNode(referenceNode)
Parameters
Return value
None (undefined
).
let range = document.createRange();
let referenceNode = document.getElementsByTagName("div").item(0);
range.selectNode(referenceNode);
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4