W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2011

[DOMCore] createElement() and HTML-specific element interfaces

From: David Flanagan <dflanagan@mozilla.com>
Date: Tue, 09 Aug 2011 08:56:33 -0700
Message-ID: <4E4158B1.3000703@mozilla.com>
To: www-dom@w3.org
I can't see anything in the DOMCore spec that references the fact that 
HTML defines lots of Element subclasses and that createElement('table'), 
for example, is supposed to return an instance of HTMLTableElement.

Also, it is unclear to me what should happen if d is a document returned 
by createDocument (not createHTMLDocument) and I call 
d.createElement("table").  The spec is clear that the element will use 
the HTML namespace, but it is not clear whether the resulting object is 
instanceof  HTMLTableElement or just Element.

createElementNS() is similarly underspecified: under what circumstances 
does it create instances of the HTML-specific interfaces defined in the 
HTML spec?

     David
Received on Tuesday, 9 August 2011 15:57:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:08 GMT