Does this document has the feature DOM 1.0?
document.implementation.hasFeature("DOM", "1.0");
Try it Yourself »
Does this document has the feature TESLA X?
document.implementation.hasFeature("TESLA", "X");
Try it Yourself »
The implementation
property returns the DOMimplementation object that handles the document.
The DOM 1 Recommendation (1998) only specified one method for this object: hasFeature().
The hasFeature() method was ment to check if a DOM module was supported by the browser:
let answer = document.implementation.hasFeature("DOM", "1.0");
Problem is: All modern browsers always return true.
document.implementation
Type | Description |
Object | A DocumentImplementation object. The document's implementation object. |
document.implementation
is a DOM Level 1 (1998) feature.
It is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 9-11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!