staaky
released this
05 Jun 15:55
1.2.0: fixes & default method back to onload
It turns out polling for `naturalWidth` becomes unreliable after
changing the `src` attribute on an image. Not every browser resets
`naturalWidth` to 0 after changing `src`, doing this even seems to be
against spec.
Polling for `naturalWidth` is only safe if you can rely on the image
never changing its `src` attribute. So we're changing back to `onload`
as default.
Also fixed an issue with `onload` in IE11 that caused callbacks to fire
before the image adjusted layout.