…ering multiple resize events as high-res images are loaded in.
…ents based on user prefs
…epicted for jpgs
…roaden browser support. The included update to README.md explains the changes I'm proposing to the markup pattern (there no changes to elements themselves) to support browsers that formerly did not work, like iOS4, IE browsers versions 6-10, Android browsers 1.x and up. As a result, there aren't any known "unsupported" browsers, in that every browser tested so far at least receives a fallback image - for example, IE6-8 will only see picture source elements that do not use media queries, since it doesn't support them natively (media types are ok though). Fixes #5 and Fixes #8.
…r IE 8 and older browsers with fallback content using any source elements that don't rely on media queries (note: media types are fine though). In order for this to work, the script needs to run from HEAD, like any HTML5 shiv would. Script still works in non-IE browsers if it's not in HEAD.
…fill to run - source elements with no media attributes or media attributes specifying media types (but not queries) do not require media query support. For media attribute support in general (even in non-query supporting browsers), matchMedia polyfill is necessary, but this change ensures a non-media source element will load in JS environments. Fixes #9
…and generated the child img element if it's not already present. With this tweak in place, the picture markup pattern supports non-js fallbacks, avoids prefetch, and enjoys all benefits of the proposed picture element functionality. Production ready, perhaps.
…this point). If Modernizr is available, add a test for picture to it (adds handy picture/no-picture classes to HTML element). Also uses Modernizr's mq shim if available. Both these enhancements do NOT REQUIRE Modernizr and take just a few lines to implement.