THE WORLD'S LARGEST WEB DEVELOPER SITE

XML DOM isSupported() Method


Node Object Reference Node Object

Definition and Usage

The isSupported() method checks whether the DOM implementation supports a specific feature and that the feature is supported by the specified node.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The isSupported() method is supported in all major browsers.

Note: Internet Explorer 9 and earlier does not support this method.


Syntax

nodeObject.isSupported(feature,version)

Parameters

Parameter Type Description
feature String Required. Specifies the name of the feature to test
version String Optional. Specifies the version number of the feature to test

Return Value

Type Description
Boolean true if the feature is supported on this node, otherwise false

Technical Details

DOM Version Core Level 2 Node Object

Example

The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc(), and checks whether the DOM implementation supports a specific feature:

Example

xmlDoc = loadXMLDoc("books.xml");

x = xmlDoc.getElementsByTagName("book")[1];
document.write(x.isSupported("Events", "2.0"));

Try it yourself »

Node Object Reference Node Object

COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: