Back to Content

Document: clear() method

files/en-us/web/api/document/clear/index.md

latest304 B
Original Source

{{APIRef("DOM")}}{{Deprecated_Header}}

The Document.clear() method does nothing, but doesn't raise any error.

Syntax

js-nolint
clear()

Parameters

None.

Return value

None ({{jsxref("undefined")}}).

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}