User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20060909 Firefox/188.8.131.52 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/20060909 Firefox/220.127.116.11 I have a document with OBJECT placed in HEAD. Though in resulting DOM the OBJECT ends up in BODY. According to specs OBJECT within HEAD is perfectly legal. Reproducible: Always Actual Results: HTMLObjectElement within HTMLBodyElement in DOM Expected Results: HTMLObjectElement within HTMLHeadElement in DOM
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a6pre) Gecko/20070602 Minefield/3.0a6pre still present
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a8pre) Gecko/2007080405 Minefield/3.0a8pre still present :)
Having <object> imply <body> is correct per HTML 5.
Does HTML5 say it is OK to generate HTML-4.01 documents with DOM-structure that doesn't respect its source markup?
I'm still searching for such proclamation, if you could provide me with a link PLZ it would help. (I'm not sarcastic here.) Otherwise I'd suggest to change status of this bug.
HTML 5 replaces HTML 4, yes.
When a document is declared as HTML 4.01, IMO the parser should stick to its DTD (according to which an OBJECT-element is perfectly legal within HEAD).. I believe HTML 5 is irrelevant for such a document.
That's not how HTML, or the Web works.
(In reply to comment #9) > That's not how HTML, or the Web works. Thank you, Anne! That's what I call lossy compresion. ;)) So, because HTML5 is "replacement" for HTML4, UA should "fix" all HTML documents to conform to the new specs (which prohibits OBJECT within HEAD, doesn't it?) regardless of 1) source markup and 2) what docType is declared in the document? Then what is the docType for? If a markup violates specs let UA create a document that is not DTD-valid. But this is not the case. Furthermore I'm yet to find a source that would support fixing of a document in favour of a _different_ DTD. Could you, please Anne, point me to a proper document?
Dear Jaroslav, creating a DOM that isn't the (exact) representation of the source code is what every browser does. That's because the DOM can only represent code that contain's no errors. HTML documents are able to contain code errors, but HTML4 doesn't define how to work with these errors. Result: browser inconsistency. HTML5 will define error reecovery. You may be disappointed, but Anne is completly right. Doctypes never played a role on the web, they are completely useless. HTML5 only got one because of totally unrelated problems. XHTML doesn't need a doctype at all. When HTML 4 appeared all existing HTML 3.2 documents automatically became HTML 4 documents. The same is happening with HTML 5. That's because user agents only know HTML documents (without version information). This is explicitly stated on the top page of the HTML5 draft. See the last paragraph of http://www.whatwg.org/specs/web-apps/current-work/multipage/#status All right, returning to the bug topic: object elements in head elements would only make sense if the declare attribute was implemented interoperable. This is impossible because HTML4 doesn't really define this attribute, so there's no harm in following HTML5's definition. Dear Jaroslav, I'll close this bug. Please don't reopen it again. If there's further demand for discussion, please contact one of the many mailing list that are concerned with the future of HTML. http://www.whatwg.org/mailing-list should help you there.
Thanks for the effort, dear Daniel. Now that is what I call answer! I am not disappointed by the fact that Anne is completely right (you are one funny guy, aren't you?); I just didn't find her answers very explaining (but you can see it for yourself), so I just didn't take those seriously... Thanks again JZ
Jaroslav: s/her/his/ See http://annevankesteren.nl/about for explanation.
thanks, but I knew that