Working on a reliable polyfill for the <img srcset> attribute. https://github.com/borismus/srcset-polyfill
5 plus ones
Shared publicly•View activity
- Cool, does any Browser implement it already?
This line should probably be "'srcset' in (new Image)"
no? Given that undefined is the expected value, if srcset has not been set (unless there is come kind of magic getter).Aug 17, 2012
- +Paul Irishmay i ask what's the timeline for <img srcset> being put into webkit and hence, chrome? And the srcset attribute will be a comma delineated list with what ordering? I can't tell if this attribute is more for 2x retina displays or for covering different widths/heights of iphones vs. tablets vs. desktops.Aug 18, 2012
- no browser implements it yet. Breaking new ground here!
img.src is "" if unset, so not sure what the expected value is. However, using in sounds like a good idea anyway. Thanks! In general, I guess such a test would be a worthwhile to put into Modernizr?Aug 20, 2012
- Aug 20, 2012
- Boris, do you see a use case for adding a currentSrc IDL attribute to the spec?Nov 26, 2012
- is this polyfill still not fit for production deployments?May 5, 2014
- No. Please don't use in production.May 5, 2014