From 260d2cc44e1954d0ef019845b29fee57d22e8020 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 7 Jul 2018 15:14:43 +0200 Subject: [PATCH] luci-base: cbi.js: add NodeList.forEach() polyfill for IE 11 Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/cbi.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 6a487366f..74b275742 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; -- 2.25.1