How can I check that the node from the DOM tree is inside a specific range (https://developer.mozilla.org/en-US/docs/Web/API/Range)? Of course, the node can be totally inside the range and partly inside range.
Example
range = document.createRange(); range.selectNode(document.getElementsByTagName("div").item(0)); bool = range.isPointInRange(document.getElementsByTagName("p").item(0),1);
https://developer.mozilla.org/en-US/docs/Web/API/Range/isPointInRange
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With