JavaScript: The Definitive Guide

25.216. Node.normalize( ): merge adjacent Text nodes and remove empty ones

DOM Level 1 Core

25.216.1. Synopsis

void normalize( );

25.216.2. Description

This method traverses all descendants of this node and "normalizes" the document by removing any empty Text nodes and merging all adjacent Text nodes into a single node. This can simplify the tree structure after node insertions or deletions.

25.216.3. See Also

Text

Категории