HTML DOM Node isSupported()Method

元素对象参考手册Element Object

Examples

Button element support detection for version 2.0 core features:

var item=document.getElementsByTagName("BUTTON")[0];
item.isSupported("Core","2.0");

Output result:

true

Try it yourself »

Definition and Usage

The isSupported() method is used to determine whether the current node supports a certain feature.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the isSupported method.

Note:Internet Explorer 8 and earlier IE versions do not support this method.


Syntax

node.isSupported(feature,version)

Parameters

Parameters Type Description
feature String Required. Defines the feature you want to check for support.
version String Optional. Defines the version you want to check for support.

Return Value

Type Description
Boolean Returns true if the feature is supported, otherwise returns false.

Technical Details

DOM Version Core Level 2 Node Object


元素对象参考手册Element Object

Other Extensions