W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2013

Re: [whatwg] Why are we merging Document and HTMLDocument again?

From: Simon Pieters <simonp@opera.com>
Date: Fri, 13 Sep 2013 09:42:26 +0200
To: "Ryosuke Niwa" <rniwa@apple.com>, "Ian Hickson" <ian@hixie.ch>
Message-ID: <op.w3cac0spidj3kv@simons-macbook-pro.local>
Cc: whatwg <whatwg@whatwg.org>, Boris Zbarsky <bzbarsky@mit.edu>, Erik Arvidsson <arv@chromium.org>
On Fri, 13 Sep 2013 06:15:05 +0200, Ian Hickson <ian@hixie.ch> wrote:

> What are the places you see us as adding this in?

So the concepts discussed here are probably a bit confusing if one doesn't  
know what the spec terms mean. Let's list concrete cases and see what we  
want to do with each one.

In a browsing context:

* text/html document (uses interface "Document" and is an "HTML document")
* XML document (uses interface "Document" and is an "XML document")

Not in a browsing context:

* document.implementation.createDocument() (uses interface "XMLDocument"  
and is an "XML document")
* document.implementation.createHTMLDocument() (uses interface "Document"  
and is an "HTML document")
* new Document() (uses interface "Document" and is an "XML document")
* XHR response (uses interface "Document" and is an "XML document", even  
for text/html if I read the spec correctly)


For instance the createHTMLDocument() case currently supports named getter  
in Gecko but not in Blink.
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2519

-- 
Simon Pieters
Opera Software
Received on Friday, 13 September 2013 07:42:57 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:09 UTC