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

HTML DOM normalize method

HTML DOM normalize() method

Element Object Reference Element object

Example

Merge adjacent text nodes:

xmlDoc.getElementById("demo").normalize();

Try it »


Definition and Usage

The normalize() method merges adjacent text nodes and removes empty text nodes.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the normalize() method


Syntax

node

.normalize()

Parameters

None.

Return Value

No value is returned.

Technical Details

DOM version Core Level 2 Node Object

Element Object Reference Element object