안녕 난 기능이 플러그인 markjs에 포함해야 할 오래된 브라우저 용 플러그인 :지원 markjs 여기에 대한 데모입니다
https://markjs.io/configurator.html
서로 다른 노드 나 단어에서 단어를 강조 표시이 플러그인의 기능이라고 wrapMatchesAcrossElements있다 br 태그 사이에 내가 오래된 브라우저에서 작동하도록이 함수가 필요한 경우이 함수를 지원하는 방법에 도움이 될 수 있습니다. 이전 브라우저의 전체 플러그인을 지원하는 경우 플러그인이 현재 9 이상을 지원합니다.
this 내가 원하는 기능 :
jQuery를 오래된 브라우저 버전의 주요 문제없이 실행할 수도 있지만 6,key: "wrapMatchesAcrossElements",
value: function wrapMatchesAcrossElements(regex, ignoreGroups, filterCb, eachCb, endCb) {
var _this6 = this;
var matchIdx = ignoreGroups === 0 ? 0 : ignoreGroups + 1;
this.getTextNodes(function (dict) {
var match = void 0;
//while ((match = regex.exec(dict.value)) !== null && match[matchIdx] !== "") {
while ((match = XRegExp.exec(dict.value, regex)) !== null && match[matchIdx] !== "") {
var start = match.index;
if (matchIdx !== 0) {
for (var i = 1; i < matchIdx; i++) {
start += match[i].length;
}
}
var end = start + match[matchIdx].length;
_this6.wrapRangeInMappedTextNode(dict, start, end, function (node) {
return filterCb(match[matchIdx], node);
}, function (node, lastIndex) {
regex.lastIndex = lastIndex;
//alert(regex);
eachCb(node);
});
}
endCb();
});
}
어떤 브라우저가 필요합니까? – dude
인터넷 익스플로러 7은 모두 – jsem
입니다. https://www.freelancer.com/projects/Javascript/improve-javascript-code-support-old/ – dude