BBC-News/Imager.js — pull request #99 by benjambles (2014-07-16 11:25:44+00:00)
Title: Fixing IE10 issues with lazy load

IE10 returns undefined for naturalWidth until the image supplied in the src has loaded, rather than the 0 defined in the spec. The 'naturalWidth' in (new Image) gets around this.

It also adds a width and height to the lazy loaded images, that the this.gif.removeAttribute fix further up doesn't fix. I've removed the attributes again once the image has had its src swapped and this fixes the issue.

Lazy Loading now works in IE10.

p.s. Thanks for the script, it's been pretty useful!