home / blog

Tag Archives: polyfill

Assorted IE8 polyfills: forEach, trim, placeholders

I ended up using all of the following during recent development of weathersupermarket 2.0 and another site. Array.prototype.forEach() implemented using a for loop and fn.apply if (typeof Array.prototype.forEach !== ‘function’) { Array.prototype.forEach = function(callback, context) { for (var i = … Continue reading

Posted in geek | Tagged , , | Leave a comment