var modName = "HTML";
var modVer = "2.0";
var conformTest = document.implementation.hasFeature(modName, modVer);
alert("DOM " + modName + " " + modVer + " supported?: " + conformTest);
// alerts with: "DOM HTML 2.0 supported?: true" if DOM Level 2 HTML module is supported.
A list of module names (e.g., Core, HTML, XML, etc) is available in the DOM Level 2 Conformance Section
If available, DOMImplementation is a special object that provides services for controlling things outside of a single document. For example, the DOMImplementation interface includes a createDocumentType method with which DTDs can be created for one or more documents managed by the implementation.
Page last modified 06:28, 12 Apr 2007 by Emcc?