Re: srcN - Alternative to picture and srcset

On Fri, Sep 27, 2013 at 5:25 AM, Cory Brown <oh.wise.man@gmail.com> wrote:
>> the algorithm does not in the least care that the numbers are sequential so long as they sort properly
>
> It's not a deal breaker for me necessarily, but if the numbers serve no functional purpose other than to not have multiple indents ally named attributes, I'd like to see if we can work around that. The existence of the numbers could easily be misunderstood to have some priority value to them.

They do, in fact, have a priority value - the MQs are evaluated in
order, and the first one to evaluate true is chosen.

There's no other way to work around this without just packing
everything into a single attribute with another level of separator
between them.

>> I wonder if Image.src should reflect the winning candidate (and if we should trigger an event when that changes).
>
> I believe src can treated as an attribute where as currentSrc can be treated as a property, meaning it reflects actual state.

If necessary, I can supply a more advanced DOM proposal than "just use
getAttribute()".

~TJ

Received on Friday, 27 September 2013 16:55:53 UTC