Determines if the document is being served as application/xhtml+xml. Returns boolean.
isAppXML = so_isAppXML();
This function is used in the Mouseover DOM Inspector v2.0 to determine if the "edit html" functionality is available, as the innerHTML property is read-only on application/xhtml+xml documents.
function so_isAppXML() {
if(document.contentType) {
var cType = document.contentType.indexOf("application/xhtml+xml") > -1;
} else {
var cType = false;
}
return cType;
}
This code is issued under a Creative Commons license. You do not need my permission to use it, though I'm always interested in seeing where my code has ended up if you want to drop me a line.
slayeroffice main