[Bug 22960] New: Document, XMLDocument, HTMLDocument, oh my

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22960

            Bug ID: 22960
           Summary: Document, XMLDocument, HTMLDocument, oh my
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: annevk@annevk.nl
          Reporter: arv@chromium.org
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org

The html and dom specs only have Document and XMLDocument. This does not match
reality where we actually have HTMLDocument as well.

WebKit/Blink:

XMLDocument === Document // true
HTMLDocument.prototype.__proto__ === Document.prototype  // true
SVGDocument.prototype.__proto__ === Document.prototype  // true

document.implementation.createDocument(null, 'root', null)  // Document
document.implementation.createDocument('http://www.w3.org/1999/xhtml/', 'html',
null)  // Document
document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg',
null)  // SVGDocument
document.implementation.createHTMLDocument('title')  //  HTMLDocument

Gecko:

XMLDocument.prototype.__proto__ === Document.prototype  // true
HTMLDocument.prototype.__proto__ === Document.prototype  // true
SVGDocument.prototype.__proto__ === Document.prototype  // true

document.implementation.createDocument(null, 'root', null)  // XMLDocument
document.implementation.createDocument('http://www.w3.org/1999/xhtml/', 'html',
null)  // XMLDocument
document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg',
null)  // XMLDocument
document.implementation.createHTMLDocument('title')  //  HTMLDocument

IE10:

typeof XMLDocument  // 'undefined'
typeof HTMLDocument  // 'undefined'
typeof SVGDocument  // 'undefined'

document.implementation.createDocument(null, 'root', null)  // Document
document.implementation.createDocument('http://www.w3.org/1999/xhtml/', 'html',
null)  // Document
document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg',
null)  // Document
document.implementation.createHTMLDocument('title')  //  Document

IE11:

XMLDocument.prototype.__proto__ === Document.prototype  // true
HTMLDocument.prototype.__proto__ === Document.prototype  // true
typeof SVGDocument  // 'undefined'

document.implementation.createDocument(null, 'root', null)  // XMLDocument
document.implementation.createDocument('http://www.w3.org/1999/xhtml/', 'html',
null)  // XMLDocument
document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg',
null)  // XMLDocument
document.implementation.createHTMLDocument('title')  //  HTMLDocument

It is unclear if there is a way to create an SVGDocument in IE and Gecko.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Wednesday, 14 August 2013 16:46:57 UTC