[whatwg] srcset javascript implementation (Respondu)

huperekchuno at googlemail.com huperekchuno at googlemail.com
Mon May 21 07:58:27 PDT 2012


Hey Glen, 

Thanks for that!

Dave
Sent from my BlackBerry® smartphone on O2

-----Original Message-----
From: Glenn Maynard <glenn at zewt.org>
Date: Mon, 21 May 2012 09:12:58 
To: <huperekchuno at googlemail.com>
Cc: Julian Reschke<julian.reschke at gmx.de>; <whatwg at whatwg.org>
Subject: Re: [whatwg] srcset javascript implementation (Respondu)

On Mon, May 21, 2012 at 2:36 AM, <huperekchuno at googlemail.com> wrote:

> Hey Julian
>
> I believe the attribute sets are delimited by comma, whereas each
> attribute itself is separated by space?
>
> The split is to load each attribute set into an array.
>
> The actual attributes themselves are matched with regex's, to be more
> forgiving to the order.
>

What you need is the parsing algorithm:

http://www.whatwg.org/specs/web-apps/current-work/#processing-the-image-candidates

(modulo https://www.w3.org/Bugs/Public/show_bug.cgi?id=17079, at least)

-- 
Glenn Maynard



More information about the whatwg mailing list