Javascript Reference - HTML DOM implementation Property








The implementation property returns the DOMimplementation object for the document.

Browser Support

implementation Yes Yes Yes Yes Yes

Syntax

document.implementation

Return Value

The document's implementation object, as a DocumentImplementation object.

Example

The following code shows how to get document's DOMimplementation object.


<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<!--   ww  w.j  a  va 2 s .  c  o  m-->
<script>
function myFunction()
{
    var imp=document.implementation;
    var x=document.getElementById("demo");
    x.innerHTML=imp.hasFeature("HTML","1.0");
}
</script>

</body>
</html>

The code above is rendered as follows: