ZVON > References > DOM1 Reference

hasFeature (method)

Owning interface and usage:  
DOMImplementation.hasFeature(feature, version)

Member of these other interfaces :  
none

Description:  
Test if the DOM implementation implements a specific feature.

Parameters:  
DOMString feature  -  The package name of the feature to test. In Level 1, the legal values are "HTML" and "XML" (case-insensitive).
DOMString version  -  This is the version number of the package name to test. In Level 1, version 1.0, this is the string "1.0". If the version is not specified, supporting any version of the feature will cause the method to return true.

Returns:  
Boolean -  true if the feature is implemented in the specified version, false otherwise.

Exceptions:  
none


Example:
JavaScript:
  var output = document.implementation.hasFeature('HTML', '1.0');
Output:
desired your browser
(who knows :-)