[whatwg] Features for responsive Web design

James Graham jgraham at opera.com
Wed Aug 8 03:34:30 PDT 2012


On 08/08/2012 12:27 PM, Markus Ernst wrote:

> It is better because art direction and bandwidth use cases can be solved
> differently in an appropriate manner:
> - For the bandwidth use case, no MQ is needed, but only some information
> on the sources available to let the UA decide which source to load.
> - For the art direction use case OTOH, the <picture> element is more
> intuitive to handle and also easier to script, as sources can be added
> or removed via DOM.

What are the use cases for adding/removing images? It seems to me that 
they would be better addressed by having a good API for interacting with 
srcset rather than adopting an element based design. For example one 
could have HTMLImageElement.addSrc(url, options) where options is a 
dictionary allowing you to set the various srcset options.





More information about the whatwg mailing list