This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

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