Re: [whatwg] The src-N proposal

On Mon, Nov 11, 2013 at 1:37 AM, Edward O'Connor <eoconnor@apple.com> wrote:
> Hi Henri,
>
> You wrote:
>
>> Just like AppCache, srcset is not something that you can iterate on.
>> You can't add features without breaking compatibility.
>
> This is incorrect. The srcset="" parser is specced such that new
> descriptors can be added in a backwards-compatible way.

Not really.

1. The problem we're talking about is adding new delimiters separating
the sources.  The current algorithm will just interpret them as
unknown descriptors and mangle things.

2. Just dropping unknown descriptors on the floor is not a
future-friendly way to handle things.  Long experience has shown that
something more like what CSS does - drop things at some reasonable
"unit" granularity, and allow repetition to override earlier
declarations - is the right way to do things.  (For example, another
example of "just ignore anything you don't understand" that worked
badly was HTML4's media attribute. We had to add an "only" keyword
just to let authors trick legacy UAs into ignoring things.  There's no
such trick we can use for srcset, except maybe making it legal to
repeat descriptors in the future.)

~TJ

Received on Monday, 11 November 2013 16:33:11 UTC