Closed Bug 309900 Opened 19 years ago Closed 19 years ago

<object> should not be parsed as inside <head>

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 314092

People

(Reporter: sharparrow1, Assigned: mrbkap)

References

()

Details

I expect that a document containing
<object type="text/html" data="http://www.mozilla.org">asdf</object>
will render www.mozilla.org, but it does not.  Nothing is shown.  Looking in the
DOM Inspector, the <object> tag is parsed inside the <head>.
This is INVALID per the HTML4 spec
(http://www.w3.org/TR/html401/struct/objects.html#edef-OBJECT). I suppose I
could treat the OBJECT tag as a leaf in the head (which would simplify the code
_a lot_).

Does HTML5 have anything to say on the subject?
Oh; I didn't know that. 
http://www.w3.org/TR/html401/present/frames.html#sharing-frame-data is kind of
interesting, although not paticularly useful.  I guess it could be used as an
alternative to XMLHttpRequest, although that's not that useful either.  I
suppose it's fine; it just suprised me a bit because most elements that contain
content force the body to start.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
html:object is not yet specified in HTML 5 unfortunately. I suggest we wait with
resolving this bug untill it is more clear what HTML 5 will say.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
<head> probably won't be allowed to contain <object> in HTML5 -- the declare=""
attribute is being dropped.
I'm guessing opening another bug for this was an accident; I'm duping it this way because the other bug already had a patch checked in for it, although it's not marked fixed.

*** This bug has been marked as a duplicate of 314092 ***
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
I'm sorry, I misunderstood the bug. I assumed that you were talking about the general <head><object> case, not the <object> alone case. I think attaching a testcase to the bug would have helped disambiguate it (as an attachment, it's easy to get lost in shorthand when commenting, I think).
Status: RESOLVED → VERIFIED
This was about the <head><object> case I believe. But doing |data:text/html,<head><object type="text/html" data="http://www.mozilla.org">asdf</object></head>| on FF Beta 2 makes it still appear in the body so I guess it is fixed.
The patch that allowed object in head didn't make it onto the 1.8 branch.
Ok, that clarifies it. Now the question whether or not it should be allowed in the HEAD element. Opera seems not to allow it. What does Safari do? (IE does allow it, but IE and the DOM...)
As I recall, you were the one who originally mentioned that object should be allowed in the head ;-). This is specifically mentioned in the HTML4 spec (though IMO, underspecified). I think the idea is that people might want to put:

<html><head><object src="foo.wav"><object src="foo.mp3"></object></object>...

But I'm not sure if it's worth the bugs that this shows (<object><table>foo<body> doesn't work quite right at the moment, but does anybody care?), especially considering that that would work just as well in the body.
You need to log in before you can comment on or make changes to this bug.