const highlight = new Highlight(range1, range2);
console.log(highlight.size); // 2
highlight.clear();
console.log(highlight.size); // 0Highlight: clear() method / notebook
Highlight: clear() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.