W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2011

[DOMCore] Can you create an HTML document with createDocument()?

From: David Flanagan <dflanagan@mozilla.com>
Date: Thu, 02 Jun 2011 17:33:08 -0700
Message-ID: <4DE82BC4.6020107@mozilla.com>
To: www-dom@w3.org

> A |Document 
> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#document>| 
> node is assumed to be an XML document unless it is flagged as being an 
> HTML document. Whether a document is an HTML document 
> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#html-document> 
> or an XML document 
> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#xml-document> affects 
> the behavior of certain APIs. 
createHTMLDocument() explicity flags the new document as an HTML document.

createDocument() is silent about this, which would mean that it is not 
possible to create an HTML document with createDocument(), even if you 
provide a proper namespace and property doctype object.

Firefox 4 allows me to create an HTML document with createDocument(), if 
I set the namespace and doctype correctly, so I'm wondering if this 
restriction in the spec is intentional or not.

Received on Friday, 3 June 2011 00:33:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:17 UTC