HTML DOM Document implementation attribute

definition and usage

implementation The property returns the DOMimplementation object that handles the document.

Warning!

DOM 1 Recommendation (1998) specifies only one method for this object: hasFeature().

The hasFeature() method is used to check if the browser supports the DOM module:

let answer = document.implementation.hasFeature("DOM", "1.0");

The question is: all modern browsers always return true.

instance

Example 1

Does this document have the DOM 1.0 feature?

document.implementation.hasFeature("DOM", "1.0");

try it yourself

Example 2

Does this document have the TESLA X feature?

document.implementation.hasFeature("TESLA", "X");

try it yourself

syntax

document.implementation

return value

type description
object

The DocumentImplementation object, the implementation object of the document.

browser support

document.implementation É uma característica do DOM Level 1 (1998).

Todos os navegadores suportam:

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Suporte 9-11 Suporte Suporte Suporte Suporte