I'm trying to find some text on the page, like:
function crossBrowserFind() {
var str = "Hell";
if (window.find) { // Firefox, Google Chrome, Safari
found = window.find(str);
}else {
if (document.body.createTextRange) { // Internet Explorer, Opera before version 10.5
var textRange = document.body.createTextRange();
if (textRange.findText) { // Internet Explorer
found = textRange.findText(str);
if (found) {
textRange.select();
}
}
}
}
}
But the function named "createTextRange" is not supported when run in Microsoft Edge (win10 build 10162).
Does someone know how can I find the text in Microsoft Edge?