On Aug 25, 2006, at 1:08 PM, Rob Burns wrote:


On Aug 25, 2006, at 2:13 AM, Maciej Stachowiak wrote:

Elements in an HTML document will generate the specific subclasses. However, the document object will not be an HTMLDocument (at least not currently - we may reconsider this in the future; there are complications with things like document.write).

OK, now I'm seeing the behavior you expected. However, there's a strange side-effect to this. The elements existing in the document upon load are instantiated as DOMHTML* subclasses while the elements I create with the DOMDocument createElement are now DOMElement classes. So now I have meta elements of class DOMelement and meta elements of class DOMHTMLMetaElement. I can work with this, but its a bit peculiar.

If you want to make HTML elements from an XML document you have to use createElementNS with the xhtml namespace, not createElement.

Regards,
Maciej

_______________________________________________
webkit-dev mailing list
webkit-dev@opendarwin.org
http://www.opendarwin.org/mailman/listinfo/webkit-dev

Reply via email to