Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM isDefaultNamespace method

HTML DOM isDefaultNamespace() method

Element Object Reference Element object

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 Reference Element object