English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM isDefaultNamespace() method

HTML DOM Element Object

isDefaultNamespace()The method accepts a namespace URI as a parameter, and returns a boolean value true if the namespace is the default namespace on the given node, otherwise returns false.

Syntax:

node.isDefaultNamespace(namespaceURI)
var html = document.documentElement;
var x = html.isDefaultNamespace("http:",//www.w3.org/1999/xhtml");
Test and See‹/›

Browser Compatibility

The isDefaultNamespace() method is fully supported by all browsers:

Method
isDefaultNamespace()YesYesYesYesYes

Parameter Value

ParameterDescription
namespaceURIThe URI of the namespace you want to check

Technical Details

Return Value:A boolean value, returns true if the namespace is the default value, otherwise returns false
DOM Version:DOM Level3

Related References

HTML DOM Reference:element.namespaceURI property

HTML DOM Element Object