summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-07 15:14:43 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-09 11:51:43 +0200
commit260d2cc44e1954d0ef019845b29fee57d22e8020 (patch)
tree526c565b24e7dca0bfb5485d3563634d82c7c384
parentc0de036b3162d73e9fad878afaa32e7ca0df1fed (diff)
luci-base: cbi.js: add NodeList.forEach() polyfill for IE 11
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 6a487366f8..74b275742c 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -1498,6 +1498,15 @@ String.nobr = function()
return ''.nobr.apply(arguments[0], a);
}
+if (window.NodeList && !NodeList.prototype.forEach) {
+ NodeList.prototype.forEach = function (callback, thisArg) {
+ thisArg = thisArg || window;
+ for (var i = 0; i < this.length; i++) {
+ callback.call(thisArg, this[i], i, this);
+ }
+ };
+}
+
var dummyElem, domParser;