ZVON > References > DOM2 Reference

isSupported (method )

Owning interface and usage:  
Node.isSupported(feature, version)

Member of these other interfaces:  
Attr, CDATASection, CharacterData, Comment, Document, DocumentFragment, DocumentType, Element, Entity, EntityReference, Notation, ProcessingInstruction, Text

Description:  
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.

Parameters:  
DOMString feature  -  The name of the feature to test. This is the same name which can be passed to the method hasFeature on DOMImplementation.
DOMString version  -  This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return true.

Returns:  
Boolean -  Returns true if the specified feature is supported on this node, false otherwise.

Exceptions:  
none


Example:
Text in the first DIV.
Some text in the second DIV.
Some text and element in the third DIV.
We can try another elements. It will be much more interesting.
Text in the last DIV.
Source:
   <div id="doc">
     <div>
       Text in the first DIV.
     </div>
     <div id="DDD" class="secondClass">
       Some text in the second DIV.
     </div>
     <div class="thirdClass">
       Some text and <span id="SSS">element</span> in the third DIV.
     </div>
     <div class="fourthClass">
       We can try <i>another elements</i>.
       It will be much more <b>interesting</b>.
     </div>
     <div>
       Text in the last DIV.
     </div>
   </div>
     
JavaScript:
  var main = document.getElementById('doc');
  var output = main.isSupported('HTML', '1.0');
Output:
desired your browser
(who knows :-)