Re: [whatwg] The src-N proposal

On 20/11/13 12:07, Simon Pieters wrote:
> On Wed, 20 Nov 2013 12:30:18 +0100, James Graham
> <james@hoppipolla.co.uk> wrote:
>
>> This seems like a nice proposal. There seems to be a minor problem
>> that elements created through innerHTML will have the parser created
>> flag set and so will not start loading until they are inserted into
>> the document. So you probably want to call the flag the "delayed load"
>> flag or somesuch, and only set it if the parser isn't in the fragment
>> case.
>
> Yeah, indeed, thanks.
>
> A separate case I was thinking about is more than one <img>s in a
> <picture>, do we want both to work or just the first? The proposal right
> now would do both. If we want only the first, that means the selection
> algorithm needs to check that there are no previous img siblings. When
> an img is inserted to a picture so it becomes the first img, we need to
> rerun the selection algorithm on the next img sibling (i.e. the img
> element that was previously the first). Similarly when an img element is
> removed, the (new) first img child needs to run the selection algorithm.
> Although it involves more checks, I think it seems saner to have only
> the first img use the <source>s.
>

I'm not sure that the extra checks buy you much apart from 
implementation complexity. What are you trying to protect against?

Received on Wednesday, 20 November 2013 12:11:37 UTC