Javascript DOM HTML Document implementation Property

Introduction

Return this document's DOMimplementation object:

var imp = document.implementation;

Click the button to check if this document has the feature HTML DOM 1.0.

View in separate window

<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">Test</button>

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

<script>
function myFunction() {//  ww  w .jav a2 s .c  om
  var imp = document.implementation;
  document.getElementById("demo").innerHTML = imp.hasFeature("HTML", "1.0");
}
</script>

</body>
</html>

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




PreviousNext

Related