Find out if the defined namespace is the default namespace:
The result of x will be:
The isDefaultNamespace() method returns true if the specified namespace is default, otherwise false.
The numbers in the table specify the first browser version that fully supports the method.
Method | |||||
---|---|---|---|---|---|
isDefaultNamespace() | Yes | 9.0 | Yes | Yes | Yes |
Parameter | Type | Description |
---|---|---|
namespaceURI | String | Required. The URI of the namespace you want to check |
Return Value: | A Boolean, returns true if the namespace is default, otherwise false |
---|---|
DOM Version | Core Level 3 Node Object |
HTML DOM reference: node.namespaceURI Property