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 »
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
| Parameters | Type | Description |
|---|---|---|
| namespaceURI | String | Required. The namespace URI 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 |
|---|
Element object