[whatwg] <picture> redux
timothy at apple.com
Wed Nov 20 19:36:12 PST 2013
On Nov 20, 2013, at 7:06 PM, Kornel Lesiński <kornel at geekhood.net> wrote:
> 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
Authors are likely going to need an explicit <img> for backwards compatibility anyway. Having an implicit <img> in the shadow DOM that is created if one isn't explicitly provided is interesting.
— Timothy Hatcher
More information about the whatwg