hasFeature
Summary
Returns whether a specific DOM standard is implemented.
Method of dom/Implementationdom/Implementation
Syntax
var featureImplemented = implementation.hasFeature(feature, version);
Parameters
feature
- Data-type
- String
The name of the standard. Case insensitive.
version
- Data-type
- String
The version number of the standard.
Return Value
Returns an object of type BooleanBoolean
Whether the feature is implemented.
Examples
The following example uses the hasFeature method to test whether the object implements the DOM HTML standard.
var featureImplemented = document.implementation.hasFeature("HTML", "1.0");
Related specifications
- DOM Level 3 Core
- Recommendation
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]