Answers for "window.getselection outside"

0

window.getselection outside

function red(){
    // If it's not the element with an id of "foo" stop the function and return
    if(window.getSelection().baseNode.parentNode.id != "foo") return;
    ...
    // Highlight if it is our div.
}
Posted by: Guest on July-24-2021

Browse Popular Code Answers by Language