== .empty ==

.empty()

Deletes all the element’s child nodes.
Usage:
[[mdn>Web/API/HTMLElement|HTMLElement]] = Element.''empty''()
Member of:
[[mdn>Web/API/HTMLElement|HTMLElement]]
Parameters:
none
Returns:
The [[mdn>Web/API/HTMLElement|HTMLElement]] it was called on, thus allowing for command chaining.
===== Examples ===== A simple example could look like this: document.getElementById('foo').empty(); ===== More information ===== * [[mdn>Web/API/Node/removeChild|Node: removeChild() method]] on MDN.