Javascript Reference
Categories: Node

javascript Node isSupported( )

@March 15, 2008, 1:22 a.m.
isSupported( )Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2  

isSupported("feature", "version")

  

Returns a Boolean true if the current node supports (i.e., conforms to the required specifications of) a stated W3C DOM module and version. While the document.implementation object's hasFeature( ) method performs the same test, it does so on the entire browser application. The isSupported( ) method performs the test on an individual node, allowing you to verify feature support for the current node type. Parameter values for isSupported( ) are the same as for document.implementation.hasFeature( ).

 

It is up to the browser maker to validate that the DOM implemented in the browser conforms with each module before allowing the browser to return true for the module. That doesn't necessarily mean that the implementation is bug-free or consistent with other implementations. Caveat scriptor.

 

In theory, you could use this method to verify module support prior to accessing a property or invoking a method, as in the following fragment that assumes myElem is a reference to an element node:

if (myElem.isSupported("CSS", "2.0")) {
    myElem.style.color = "green";
}
 

In practice, object detection is a better solution because W3C DOM support reporting facilities are not widely implemented yet and are certainly not backward compatible.

 
Parameters
 
  • As of W3C DOM Level 2, permissible case-sensitive module name strings are: Core, XML, HTML, Views, StyleSheets, CSS, CSS2, Events, UIEvents, MouseEvents, MutationEvents, HTMLEvents, Range, Traversal.
  • String representation of the major and minor version of the DOM module cited in the first parameter. For the W3C DOM Level 2, the version is 2.0, even when the DOM module supports another W3C standard that has its own numbering system. Thus, the test for HTML DOM module support is for Version 2.0, even though HTML is at 4.x.
 
Returned Value

Boolean value: true | false.

More comprehensive description of the structural details of the estrogen receptor protein complex illustrates important aspects of its functions <a href=https://bestcialis20mg.com/>buying cialis online usa</a>
Assauppuh - 2 years
Ssniih https://newfasttadalafil.com/ - buy viagra cialis online Xfvpwx cialis overnight delivery <a href=https://newfasttadalafil.com/>Cialis</a> Odjyep https://newfasttadalafil.com/ - order cialis Lzgwrm Medicamento Cialis Para Que Sirve
Beftthevy - 2 years

Powered by Linode.