Node.isSupported()
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
The Node.isSupported()
method 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
DOMString
containing the name of the feature to test. This is the same name which can be passed to the methodhasFeature
on DOMImplementation. Possible values defined within the core DOM specification are listed on the DOM Level 2 Conformance Section. - version
-
Is a
DOMString
containing 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
This feature is not part of any specification. It is no longer on track to become a standard.
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
isSupported |
1-34 |
No |
1-22 |
9 |
≤12.1-21 |
1-10 |
1-37 |
18-34 |
4-22 |
≤12.1-21 |
1-10 |
1.0-2.0 |
See also
- The
Node
interface it belongs to.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Node/isSupported