W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] srcset javascript implementation (Respondu)

From: David Clements <huperekchuno@googlemail.com>
Date: Mon, 21 May 2012 03:21:37 +0100
Message-ID: <CAF8j4VuqZDyzm7DOP95bVfdd+4A10jEEeMQow4Z=mBhQHRV5Ag@mail.gmail.com>
To: whatwg@whatwg.org
Hi guys,

Just to let you all know, I've written a javascript implementation of
srcset using a framework for responsive images (which I also wrote)
called Respondu (I'm open to new name suggestions), I'd love it if someone
could check that I've implemented srcset right.

Respondu manages to process the DOM without allowing any assets (contained
in the body) to load, it also gracefully degrades for non-js
browsers and is fairly unintrusive (it simply wraps the contents of the
body tags).

Check out the github page (feedback, pull requests, lunch money etc.
welcome)

https://github.com/davidmarkclements/Respondu

You can also see working examples at

http://respondu.davidmarkclements.com/

The framework, and srcset implementation are currently in alpha - its not
presently compatible the document.ready et. al., however
you can simply put scripts at the bottom of the body instead (which is best
practice in most cases anyway).

So far, it's tested and works in ie8, chrome, firefox, and iOS safari.

Let me know if it works/doesn't work in other browsers!

All the best,

Dave
Received on Monday, 21 May 2012 02:22:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT