You are here: Reference > JavaScript > client-side > browser > methods > isSupported

isSupported method

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

Syntax:

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

Parameters:

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

Return value:

Boolean. One of the following values:
false Not supported.
true Supported.

Example HTML code 1:

This example illustrates the use of the isSupported method:
<head>
    <script type="text/javascript">
        if (document.isSupported) {
            if (document.isSupported ("HTML","2.0"))
                alert ("HTML 2.0 is supported by this browser");
            else
                alert ("HTML 2.0 is not supported by this browser");
        }
    </script>
</head>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content