From 28b1b49a14ee5ff2a87776dafe3e092bc78674ad Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Tue, 19 Apr 2016 19:15:01 +0200 Subject: [PATCH] remove IE<=8 innerText/textContent workaround #1535 Standardized node.textContent is available since IE9 --- lib/scripts/qsearch.js | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js index 56cf8df25..18e51506c 100644 --- a/lib/scripts/qsearch.js +++ b/lib/scripts/qsearch.js @@ -135,18 +135,8 @@ jQuery.fn.dw_qsearch = function (overrides) { return; } - // make IE's innerText available to W3C conform browsers - if (this.textContent) { - this.__defineGetter__('innerText', function () { - return this.textContent - }); - this.__defineSetter__('innerText', function (val) { - this.textContent = val - }); - } - - nsL = this.innerText.indexOf('('); - nsR = this.innerText.indexOf(')'); + nsL = this.textContent.indexOf('('); + nsR = this.textContent.indexOf(')'); eli = 0; runaway = 0; @@ -169,12 +159,12 @@ jQuery.fn.dw_qsearch = function (overrides) { length = 1; replace = '…'; } - this.innerText = substr_replace(this.innerText, + this.textContent = substr_replace(this.textContent, replace, start, length); - eli = this.innerText.indexOf('…'); - nsL = this.innerText.indexOf('('); - nsR = this.innerText.indexOf(')'); + eli = this.textContent.indexOf('…'); + nsL = this.textContent.indexOf('('); + nsR = this.textContent.indexOf(')'); } }); -- GitLab