This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28864 - Make document.write() check for "not flagged as an HTML document" instead of "XML document"
Summary: Make document.write() check for "not flagged as an HTML document" instead of ...
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#closing...
Whiteboard: [good first bug]
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-29 14:53 UTC by contributor
Modified: 2016-03-22 13:45 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2015-06-29 14:53:33 UTC
Specification: https://html.spec.whatwg.org/
Multipage: https://html.spec.whatwg.org/multipage/#closing-the-input-stream
Complete: https://html.spec.whatwg.org/#closing-the-input-stream
Referrer: 

Comment:
Make document.write() check for "not flagged as an HTML document" instead of
"XML document"

Posted from: 212.116.72.179
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2398.0 Safari/537.36 OPR/31.0.1876.0 (Edition developer)
Comment 1 Philip Jägenstedt 2015-06-29 14:56:16 UTC
This has been moved from HTMLDocument to Document together with open() and close(), and we're trying to implement that in Blink:
https://code.google.com/p/chromium/issues/detail?id=496376

open() and close() both say "If the Document object is not flagged as an HTML document, throw an InvalidStateError exception and abort these steps" while write says "If the method was invoked on an XML document, throw an InvalidStateError exception and abort these steps."

It would make sense to use the same condition in both cases.

The non-normative documentation of all three talk about XML documents, so these should probably be updated as well.
Comment 2 Anne 2016-03-22 13:45:02 UTC
https://github.com/whatwg/html/pull/916