[whatwg] <object> behavior

Andrew Oakley wrote:
> Most notably HTML5 says that the Content-Type header is used in
> preference to the type attribute, whereas the browsers seem to honour
> the attribute in preference to the header.

Firefox hasn't done that (at least across the board) since Firefox 3.0 
shipped.

Note that the behavior here in Firefox is somewhat complicated by issues 
we ran into when we initially shipped just looking at the HTTP header in 
preference to the type attribute (especially with various apple.com 
sites).  The exact Gecko behavior is the following.

1)  If the header type is application/octet-stream and the type
     attribute was set to something that parsed as a MIME type, use the
     type attribute's type.
2)  If the type attribute was set to something that parsed as a MIME
     type, and if that type would be handled by a plug-in (that is, we
     have a plug-in to handle it, and have no other method for handling
     it), then use the type attribute's type instead of the header type.
3)  In all other cases the header type is used.

> Detaching and reattaching a <object> from the document seems to make the
> browsers destroy the object and then recreate it.

What do you mean by "the object" here?  The NPAPI plug-in instance?  If 
so, we consider this behavior a bug in Gecko and plan to fix it (then 
again, we've planned it for years now...)

> Changing the attributes on an <object> that is attached to the document
> doesn't seem to "work" - Webkit does nothing, Opera seems to stop
> scripting (presumably some kind of error), Firefox reloads the plugin in
> some cases (even if its not the right one anymore).

Is this the pluginstest/tests/tests/datachangetype.html test we're 
talking about here?

I just checked, and Gecko just ignores dynamic type attribute changes 
while the node is in the document.  This might be what you're seeing...

-Boris

Received on Thursday, 6 August 2009 07:14:17 UTC