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

Ian Hickson ian at hixie.ch
Thu Sep 12 14:00:57 PDT 2013


On Thu, 12 Sep 2013, Ryosuke Niwa wrote:
> On Sep 12, 2013, at 11:43 AM, Ian Hickson <ian at hixie.ch> wrote:
> > 
> > So you also support having a Document descendant that is used for 
> > Documents that have global scopes / browsing contexts / the works, and 
> > one that is used for Documents that don't (e.g. createDocument(), 
> > XHR), where the former has the named getter and the latter doesn't?
> 
> I think that's what I'm suggesting except that I'm suggesting to keep 
> calling the former HTMLDocument.
> 
> As far as I checked, SVGDocument and alike don't have named getter 
> either so I'd rather not introduce it any non-HTML document.

What's an "HTML document" in this world? Something served using text/html? 
Something with a browsing context? Some combination thereof?

SVGDocument is supposed to be merged into Document as well. The idea is to 
not have any descendants of Document. The reason is that you can have 
compound documents that need both the SVG and HTML (and MathML and FooML) 
methods. There's no such thing as "non-HTML documents" now. Documents can 
have SVG and HTML and mix it at will.

I can see having a special descendant that does the name stuff, if we can 
determine exactly when it would apply. Note that what the DOM and HTML 
specs call "HTML Document" vs "XML Document" is not the same criteria as 
was being discussed here earlier (whether it has a browsing context).

But I think it's unfortunate to be considering yet another mode switch.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list