[whatwg] HTMLness bit on script-created documents

On Thu, 8 Oct 2009, Henri Sivonen wrote:
>
> Gecko currently looks at the doctype passed to createDocument() in order to
> decide what interfaces to offer on the returned document and in order to
> determine if the HTMLness bit gets set.

All interfaces should be supported, per HTML5.

The bit should not be set, per HTML5.


> DOM Level 3 Core mentions that DOM Level 2 HTML specifies a method 
> called createHTMLDocument(). I see such a method in DOM Level 2 HTML CR 
> http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html but I don't 
> see it in the REC http://www.w3.org/TR/DOM-Level-2-HTML/html.html. Gecko 
> doesn't implement this method but Opera and WebKit do.
>
> Is there a reason why HTML5 doesn't mention createHTMLDocument()?

As you say, it wasn't in the DOM2 HTML REC. I'd rather not have it at all, 
if we don't need it.


On Thu, 8 Oct 2009, Olli Pettay wrote:
>
> The HTMLness wasn't implemented because of ACID3. It was implemented 
> because it was wanted that .createDocument() could return documents 
> which might get created in other ways too (like loading a page). So it 
> is possible to create svg/html/xhtml/etc documents.

That's the interface, but why the HTMLness bit? (Affects things like 
document.write().)


Unless there's a good use case, I would suggest we don't add a way to 
create such documents just for the sake of it.

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

Received on Friday, 16 October 2009 14:49:47 UTC