add polyfill for NodeList.prototype.forEach (unsupported in Internet Explorer)
This commit is contained in:
parent
b63c08b263
commit
77a5d9db83
|
@ -12,3 +12,4 @@ import 'core-js/fn/symbol';
|
|||
// Browser polyfills
|
||||
import './polyfills/custom_event';
|
||||
import './polyfills/element';
|
||||
import './polyfills/nodelist';
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue