Created
September 19, 2017 20:10
-
-
Save ppsirius/b1a6d18f8bc1857efc181c710d8e8a5d to your computer and use it in GitHub Desktop.
Fix for IE awsome browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * forEach Polyfill | |
| * | |
| * 2015-12-27 | |
| * | |
| * By Feifei Hang, http://feifeihang.info | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ | |
| 'use strict'; | |
| (function () { | |
| if (!Array.prototype.forEach) { | |
| Array.prototype.forEach = function forEach (callback, thisArg) { | |
| if (typeof callback !== 'function') { | |
| throw new TypeError(callback + ' is not a function'); | |
| } | |
| var array = this; | |
| thisArg = thisArg || this; | |
| for (var i = 0, l = array.length; i !== l; ++i) { | |
| callback.call(thisArg, array[i], i, array); | |
| } | |
| }; | |
| } | |
| })(); | |
| (function () { | |
| if ( typeof NodeList.prototype.forEach === "function" ) return false; | |
| NodeList.prototype.forEach = Array.prototype.forEach; | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment