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

> I agree with bz. We need to do this per property, not all at once. And while doing it, it is possible that we figure out the merge isn't really possible. We don't really know the *behavior* of the stuff Edge has.

We moved it in smaller parts in Blink as well. Testing what others do makes sense for each step. It seems pretty likely that it's web compatible to move everything, so the question is what you'd like to *attempt* to do in Gecko.

> Does Edge still have HTMLDocument interface? What is the prototype chain of an (html) document?

Edge still has an HTMLDocument interface, and an instance has the expected prototype chain HTMLDocument : Document : Node : EventTarget.

> I'm tiny bit worried about stuff like open/write/close for example: do they work as expect with SVG or Mathml or such?

In Blink, these and `writeln()` all throw InvalidStateError for XML documents, as per spec:
https://html.spec.whatwg.org/#dynamic-markup-insertion

In Edge, it looks like `open()` and `close()` don't throw an exception (not sure what they do) but `write()` and `writeln()` do.

So there's still some interop work to do here...

Finally, one thing that could go badly here if we all aim to make HTMLDocument and XMLDocument aliases of Document is that one or two engines succeed, but the next to try runs into engine-specific troubles similar to that around Gecko's `XMLDocument.prototype.load`, leaving us in an non-interoperable state for a long time.

---
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-236701433

Received on Monday, 1 August 2016 20:46:33 UTC