You are here: Reference > JavaScript > client-side > HTML DOM > methods > hasFeature (implementation)
hasFeature method (implementation)
Returns whether the specified feature and version is implemented by the browser.
To detect whether a DOM module and version is supported by a node, use the isSupported method.
Syntax:
You can find the related objects in the Supported by objects section below.
Parameters:
Required. String that specifies the name of the feature. This parameter is case-insensitive.
Some of the possible values:
|
|||||||||||||||||||||||
Required in Firefox and Opera, optional in Internet Explorer, Google Chrome and Safari. String that specifies the version number (such as '1.0'). |
Return value:
Boolean. One of the following values:
Not implemented. | |
Implemented. |
Example HTML code 1:
This example illustrates the use of the hasFeature method:
|
||||
<head> <script type="text/javascript"> function CheckFeature () { alert (document.implementation.hasFeature ("HTML","1.0")); } </script> </head> <body> <button onclick="CheckFeature ()">Is the DOM HTML 1.0 standard is implemented?</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
External links:
User Contributed Comments