[whatwg] <object>, type, and fallback

On Dec 5, 2011, at 23:06 , Simon Pieters wrote:

> On Mon, 05 Dec 2011 22:19:33 +0100, Brady Eidson <beidson at apple.com> wrote:
> 
>> I can't find a definitive answer for the following scenario:
>> 
>> 1 - A page has a plug-in with fallback specified as follows:
>> 
>> <object type="application/x-shockwave-flash">
>> <param name="movie" value="Example.swf"/>
>>    <img src="Fallback.png">
>> </object>
>> 
>> 2 - The page is loaded, the browser instantiates the plug-in, and the plug-in content is shown.
>> 
>> 3 - A script later comes along and dynamically changes the <object>'s type attribute to "application/some-unsupported-type"
>> 
>> Should the browser dynamically and immediately switch from the plug-in to the fallback image?
>> If not, what should it do?
>> And is this specified anywhere?
>> 
>> Thanks,
>> ~Brady
> 
> 
> "... when neither its classid attribute nor its data attribute are present, whenever its type attribute is set, changed, or removed: the user agent must queue a task to run the following steps to (re)determine what the object element represents. The task source for this task is the DOM manipulation task source."
> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-object-element
> 
> The algorithm then determines in step 5 that there's no suitable plugin, and falls back.

Yup, it's "as clear as day" when pointed out.

Thanks!

~Brady

> 
> -- 
> Simon Pieters
> Opera Software

Received on Tuesday, 6 December 2011 08:58:50 UTC