ObsoleteThis feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
The Node.isSupported()returns a Boolean flag containing the result of a test whether the DOM implementation implements a specific feature and this feature is supported by the specific node.
Syntax
boolValue = element.isSupported(feature, version)
Parameters
- feature
- Is a
DOMStringcontaining the name of the feature to test. This is the same name which can be passed to the methodhasFeatureon DOMImplementation. Possible values defined within the core DOM specification are listed on the DOM Level 2 Conformance Section. - version
- Is a
DOMStringcontaining the version number of the feature to test. In DOM Level 2, version 1, this is the string2.0. If the version is not specified, supporting any version of the feature will cause the method to return true.
Example
<div id="doc">
</div>
<script>
// Get an element and check to see if its supports the DOM2 HTML Module.
var main = document.getElementById('doc');
var output = main.isSupported('HTML', '2.0');
</script>
Specifications
| Specification | Status | Comment |
|---|---|---|
| Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'Node.isSupported()' in that specification. | Obsolete | No change from Document Object Model (DOM) Level 2 Core Specification. |
| Document Object Model (DOM) Level 2 Core SpecificationThe definition of 'Node.isSupported()' in that specification. | Obsolete | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
isSupported
|
Chrome
No support No |
Edge
No support No |
Firefox
No support 1 — 22 |
IE
? |
Opera
? |
Safari
? |
WebView Android
No support No |
Chrome Android
No support No |
Firefox Android
No support 4 — 22 |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
No support No |
Legend
- No support
- No support
- Compatibility unknown
- Compatibility unknown
See also
- The
Nodeinterface it belongs to.
Node.isSupported() by Mozilla Contributors is licensed under CC-BY-SA 2.5.