You are here: Reference > JavaScript > client-side > HTML DOM > methods > hasFeature (implementation)

hasFeature method (implementation)

Browser support:
Returns whether the specified feature and version is implemented by the browser.
To detect whether a DOM module and version is supported by a node, use the isSupported method.


object.hasFeature (feature, version);
You can find the related objects in the Supported by objects section below.


Required. String that specifies the name of the feature. This parameter is case-insensitive.
Some of the possible values:
XML DOM standard.
HTML DOM standard.
Required in Firefox and Opera, optional in Internet Explorer, Google Chrome and Safari. String that specifies the version number (such as '1.0').

Return value:

Boolean. One of the following values:
false Not implemented.
true Implemented.

Example HTML code 1:

This example illustrates the use of the hasFeature method:
    <script type="text/javascript">
        function CheckFeature () {
            alert (document.implementation.hasFeature ("HTML","1.0"));
    <button onclick="CheckFeature ()">Is the DOM HTML 1.0 standard is implemented?</button>
Did you find this example helpful? yes no

Supported by objects:

External links:

User Contributed Comments

Post Content

Post Content