diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-07-07 15:14:43 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-07-09 11:51:43 +0200 |
commit | 260d2cc44e1954d0ef019845b29fee57d22e8020 (patch) | |
tree | 526c565b24e7dca0bfb5485d3563634d82c7c384 /modules/luci-base/htdocs/luci-static | |
parent | c0de036b3162d73e9fad878afaa32e7ca0df1fed (diff) |
luci-base: cbi.js: add NodeList.forEach() polyfill for IE 11
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 9 |
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 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; |