This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function supportsCSSHighlightAPI() { | |
return ( | |
typeof CSS !== 'undefined' && | |
typeof CSS.highlights !== 'undefined' && | |
typeof Highlight !== 'undefined' && | |
typeof Range !== 'undefined' | |
); | |
} | |
let getPreviousWords = (text, firstMatchIndex, length = 40) => { |