Re: [whatwg/dom] Un-merge Document and HTMLDocument (#221)

Some thoughts on the WebKit ToT list from https://github.com/whatwg/dom/issues/221#issuecomment-240182587
* `document.all` looks to me like it it'd work just fine with any kind of document. The implementation itself is already on `Document` in Blink and when I tried moving it my [ad-hoc test](https://software.hixie.ch/utilities/js/live-dom-viewer/saved/4440) worked fine.
* `alinkColor`, `bgColor`, `fgColor`, `linkColor` and `vlinkColor` work as long as there's a body element, and `document.body` is already on `Document`. There are also a bunch of collections like `document.forms` on `Document`.
* `clear()`, `captureEvents()` and `releaseEvents()` are all no-ops so it doesn't matter much.
* `close`, `open`, `write` and `writeln` would all throw exceptions and wouldn't be useful on `Document`. The one benefit of moving them anyway is that the exception message could say why it didn't work.

At the end of the day, I don't feel *strongly* about any of these, any course of action that would get us to interop would be fine.

The missing piece here is what to do about the `Document` constructor? Per https://github.com/whatwg/dom/issues/278#issuecomment-239461359 I think we should try to retain it, but what should it return? Gecko and WebKit both return a document with `contentType` "application/xml", but it's really unfortunate that it isn't an `XMLDocument` then. @cdumez @ayg, thoughts?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/221#issuecomment-244724939

Received on Monday, 5 September 2016 11:29:30 UTC