HTML DOM isDefaultNamespace()Method
Example
Check whether the defined namespace is the default namespace:
document.documentElement.isDefaultNamespace('http://www.w3.org/1999/xhtml');
Output result:
true
Try it Yourself »
Definition and Usage
If the specified namespace is the default, the isDefaultNamespace() method returns true, otherwise it returns false.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the isDefaultNamespace method.
Note:Internet Explorer 8 and earlier IE versions do not support this method.
Syntax
node.isDefaultNamespace(namespaceURI)
Parameters
| Parameter | Type | Description |
|---|---|---|
| namespaceURI | String | Required. The namespace URI that you want to check. |
Return Value
| Type | Description |
|---|---|
| Boolean | Returns true if it is the default namespace, otherwise returns false. |
Technical Details
| DOM Version | Core Level 3 Node Object |
|---|
Other Extensions
Element Object