[whatwg] document.contentType


Regardless of any decision on whether my recommendation for 
document.contentType to be standardized and made settable on a document 
created by createDocument() (rather than needing to call the 
less-than-intuitive doc.open() fix for HTML), I'd still like to 
recommend standardizing on Mozilla's document.contentType ( 
https://developer.mozilla.org/en/DOM/document.contentType ) for at least 
being able to get the property.

It can be very useful for JavaScript code or a generic library to offer 
support for XHTML or HTML, such as conditionally calling 
getElementsByTagNameNS() (feature detection will not help since a 
document may still be in HTML even if the browser supports XHTML).


Received on Tuesday, 2 June 2009 18:24:29 UTC