[whatwg] <picture> redux

Kornel Lesiński kornel at geekhood.net
Wed Nov 20 19:06:14 PST 2013


On Wed, 20 Nov 2013 17:25:07 -0000, Tab Atkins Jr. <jackalmage at gmail.com>  
wrote:

> Simon Pieters wrote up Kornel's earlier approach to a saner, more
> palatable source selection algorithm for <picture> (rather than
> copying <video>/<audio>).  This approach also has a new wrinkle:
> <picture> *requires* an <img> child, and it's the <img> that still
> actually displays the image.  The <picture> element is just a wrapper
> for the <img>+<source> elements, and provides a context for the source
> selection algorithm.  This makes testing substantially easier, as we
> can limit ourselves to testing the source selection algorithm, and
> probably makes implementation easier as well.

Can we hide the "controlling" <img> in shadow DOM? And make  
HTMLPictureElement the interface that proxies relevant properties/events  
to the internal <img>?

Reuse of <img> is a great idea for simpler implementation and testing, but  
maybe we don't even need to expose that fact to the authors.

-- 
regards, Kornel



More information about the whatwg mailing list