- XML DOM Basics
- XML DOM - Home
- XML DOM - Overview
- XML DOM - Model
- XML DOM - Nodes
- XML DOM - Node Tree
- XML DOM - Methods
- XML DOM - Loading
- XML DOM - Traversing
- XML DOM - Navigation
- XML DOM - Accessing
- XML DOM Operations
- XML DOM - Get Node
- XML DOM - Set Node
- XML DOM - Create Node
- XML DOM - Add Node
- XML DOM - Replace Node
- XML DOM - Remove Node
- XML DOM - Clone Node
- XML DOM Objects
- DOM - Node Object
- DOM - NodeList Object
- DOM - NamedNodeMap Object
- DOM - DOMImplementation
- DOM - DocumentType Object
- DOM - ProcessingInstruction
- DOM - Entity Object
- DOM - EntityReference Object
- DOM - Notation Object
- DOM - Element Object
- DOM - Attribute Object
- DOM - CDATASection Object
- DOM - Comment Object
- DOM - XMLHttpRequest Object
- DOM - DOMException Object
- XML DOM Useful Resources
- XML DOM - Quick Guide
- XML DOM - Useful Resources
- XML DOM - Discussion
DOM - DOMImplementation Object Method - hasFeature
The method hasFeature () tests if the DOM implementation implements a specific feature and version as defined in DOM Features.
Syntax
Following is the syntax of the hasFeature () method.
flag = document.implementation.hasFeature(feature, version);
S.No. | Parameter & Description |
---|---|
1 | feature It is a DOMString representing the feature name. |
2 | version It is a DOMString representing the version of the specification defining the feature. |
Example
Following example demonstrates the usage of the hasFeature () method −
<!DOCTYPE html> <html> <body> <script> document.write(document.implementation.hasFeature('Core', '3.0')); </script> </body> </html>
Execution
Save this file as domimplementation_hasfeature.htm on the server path. We will get the output as shown below −
true
dom_domimplementation_object.htm
Advertisements