Open blinkcursor opened 8 years ago
Which version of Safari did you try this on? Safari 8 supported srcset, but not the sizes attribute. Safari 9 supports both, and reports both as true.
I will add to this though. Checking for sizes
in an image object does report false positives in older versions of Firefox that didn't support srcset
- a more reliable check would be to check for both srcset
and sizes
support in the sizes
check
Thanks @blinkcursor and @mynamesleon. I'll dig in in a bit!
Safari does now support srcset and sizes, but for some reason sizes is not available on the img object, and so your test reports that Safari doesn't have support.
(I really want to be able to set sizes on some dynamically added content, so if anyone knows if sizes is available through some other means please let me know.)