📜  avascript-how-to-detect-if-a-word-is-highlighted - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:39.684000             🧑  作者: Mango

代码示例1
export const isHighlighting = () => {
  // detects mouse is highlighting a text
  return window.getSelection && window.getSelection().type === 'Range';
};