/

HTML / CSS / JavaScript Tutorial

JavaScript Document own method: normalizeDocument()

[this page | pdf | back links]

In theory, the normalizeDocument() method (when applied to the document object of the JavaScript DOM) removes empty text nodes and joins adjacent text nodes. It has the same effect (when applied to the document as a whole) as normalize() (but the latter can also be applied at lower node levels in isolation).

 

In practice, normalizeDocument() does not currently seem to be supported by major browsers, so it is likely to be more robust to use document.normalize()instead.

 

It has the following syntax with no parameters. It does not return a value.

 

document.normalizeDocument()

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile