added picturefill ready & update events and jslint fixes #60

wants to merge 2 commits into

10 participants


Fires picture fill ready event first time, then picture fill update event subsequent times. Also updated picturefill code to pass jslint.


any clues when this will be pulled in? would be a great feature to have...


bump :)


While this feature would be awesome, it breaks in IE8.


Really looking for this feature to be able to lazyload the given image. How is the syntax to use picturefill_ready and picturefill_update?


@zoo2rock if you're looking to lazyload, i have a branch at or that takes a postpone attr to delay loading until the image is in the viewport.


@nwtn thx, I will check out your branch. So far I determine the most dominant color (serverside), attach the color as BG-color to the picturefill span and lazyload ( the responsive images/picturefill images. Because of my given setup I'm interested how to listen / define the callback for picturefill. Any suggestions? Thanks.


@nwtn thx, looks great your fork!


@zoo2rock great, glad it was helpful for you


@u982744 - Great job on your update, I am looking for a way to have a callback triggered after the images are loaded. I think this is similar to #53 in that I am trying to determine maximum height of a set of divs.

After reading through the comments it sounds like the general consensus is to handle this separately than the picturefill itself. Any updates on your pull?


I've made it work in IE8 now. You have to use the method picturefill.bind though. This is because a workaround needs to be used to allow custom events in IE8.

picturefill.bind("picturefill_ready", function () {
alert("ready now!");

picturefill.bind("picturefill_update", function () {
alert("updated now!");


Bump for merge, picturefill doesn't seem to work at all when I try to drop-in the forked version and we desperately need this.


Hm, this one is tricky. It’s an easy enough change, but would take us back out of “polyfill” territory. In the case of the native picture, both of these events—one on initially loading the source and one when a new source is swapped in—would be handled by listening for a load event on the inner img. There won’t be anything in the way of custom picture events.

We’ll talk this one over internally and get back to everyone.


Closing based on prior comment. Thanks!

@scottjehl scottjehl closed this Apr 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment