[whatwg] Adding resourceless media to document causes error event

On Wed, 4 Feb 2009, Chris Pearce wrote:
>
> My reading of the spec is that if you have a media element with no src 
> attribute or source element children (e.g. <video></video>) and you 
> insert it into a document, then the media load() algorithm will be 
> implicitly invoked, and because the list of potential media resources is 
> empty, that algorithm will immediately fall through to the "failure 
> step" (step 12), causing an error progress event to be dispatched to the 
> media element.
> 
> My question is:
> 
> Is is really necessary to invoke the load algorithm when adding a media 
> element with no src/sources to a document? Doing so just causes an error 
> progress event dispatch, and we've not exactly failed to load anything, 
> indeed, we've not even tried to load anything in this case.

The load algorithm now explicitly waits in this case.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 23 February 2009 00:15:28 UTC