diff options
Diffstat (limited to 'app/assets/javascripts/commons/polyfills/nodelist.js')
-rw-r--r-- | app/assets/javascripts/commons/polyfills/nodelist.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/commons/polyfills/nodelist.js b/app/assets/javascripts/commons/polyfills/nodelist.js new file mode 100644 index 00000000000..3772c94b900 --- /dev/null +++ b/app/assets/javascripts/commons/polyfills/nodelist.js @@ -0,0 +1,7 @@ +if (window.NodeList && !NodeList.prototype.forEach) { + NodeList.prototype.forEach = function forEach(callback, thisArg = window) { + for (let i = 0; i < this.length; i += 1) { + callback.call(thisArg, this[i], i, this); + } + }; +} |