[whatwg] embedded content: OBJECT

Hallvord Reiar Michaelsen Steen hallvord at hallvord.com
Tue Jan 24 23:21:09 PST 2006

It will be great to see OBJECT handling clarified. Here are some 

On encountering an OBJECT, the UA must check type and/or classid. 

If the type attribute identifies a file type the UA handles 
internally, check if the OBJECT has a data attribute. Render contents 
of this attribute if found, proceed to fallback contents if not.

If type/classid identifies a known plugin, the UA must initialise the 
plugin passing on information about the attributes and the name/value 
pairs of any PARAM descendants that are not children of nested OBJECT 

If type/classid does not identify a known plugin, and there is a data 
attribute, do a HEAD request on the resource identified by the data 
attribute. If the server sends a content-type that identifies a known 
plugin, initialise plugin.

If there is no data attribute, the resource can not load or the 
content-type of the resource is unknown, proceed to render fallback 

Issues: if there is a known content-type and a data: attribute, 
should the UA check if the content-type sent from server also 
identifies the plugin? In other words, do we want to say that the 
type attribute on the OBJECT tag is only a hint and that the actual 
HTTP content-type header is the one that counts?

I'm not sure if "only a hint" should be speced. It sounds quite risky 
to meddle with the logic for embedding contents - could break many 
sites, particularly if we are supposed to start relying on the 
famously malconfigured HTTP content-type responses.

Since there are use cases for plugins that do not load data at all, 
the UA should initialise the plugin even without data attribute if 
the type is known. That sort of negates the point about type being a 
hint because we can't initialise one plugin, look at the content-type 
of files that plugin decides to request and say "whops, we started 
the wrong plugin, let's do this again". If the spec goes the "hint" 
route, it really needs to make that apply only to OBJECTs with a data 
attribute, and to minimise problems with malconfigured servers it 
should only take place if the UA doesn't know the specified type 
attribute IMO.

Another issue is of course if and how one should map classid to 
Hallvord Reiar Michaelsen Steen

More information about the whatwg mailing list