Back to Content

SVGStringList: clear() method

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

latest557 B
Original Source

{{APIRef("SVG")}}

The clear() method of the {{domxref("SVGStringList")}} 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("SVGStringList")}} corresponds to a read-only attribute or when the object itself is read-only.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}