Document implementation Property - Javascript DOM

Javascript examples for DOM:Document implementation

Description

The implementation property returns the DOMimplementation object that handles this document, as a DocumentImplementation object.

Return Value

The document's implementation object, as a DocumentImplementation object

The following code shows how to return this document's DOMimplementation object:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">check if this document has the feature HTML DOM 1.0</button>

<p id="demo"></p>

<script>
function myFunction() {/*  w w w.  j  a v  a  2s. c om*/
    var imp = document.implementation;
    document.getElementById("demo").innerHTML = imp.hasFeature("HTML", "1.0");
}
</script>

</body>
</html>

Related Tutorials