Answers for "js on highlight"

0

js on highlight

document.addEventListener("selectionchange",event=>{
  let selection = document.getSelection ? document.getSelection().toString() :  document.selection.createRange().toString() ;
  console.log(selection);
})
Posted by: Guest on March-09-2022

Code answers related to "js on highlight"

Code answers related to "Javascript"

Browse Popular Code Answers by Language