Back to Content

SVGNumberList: clear() method

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

latest557 B
Original Source

{{APIRef("SVG")}}

The clear() method of the {{domxref("SVGNumberList")}} interface clears all existing items from the list, with the result being an empty list.

Syntax

js-nolint
clear()

Parameters

None.

Return value

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

Exceptions

  • NoModificationAllowedError {{domxref("DOMException")}}
    • : Thrown if the {{domxref("SVGNumberList")}} corresponds to a read-only attribute or when the object itself is read-only.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}