Back to Content

SVGSVGElement: createSVGRect() method

files/en-us/web/api/svgsvgelement/createsvgrect/index.md

latest465 B
Original Source

{{APIRef("SVG")}}

The createSVGRect() method of the {{domxref("SVGSVGElement")}} interface creates a {{domxref("DOMRect")}} object outside of any document trees.

Syntax

js-nolint
createSVGRect()

Parameters

None.

Return value

A {{domxref("DOMRect")}} object, initialized with x, y, width, and height all set to 0.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("DOMRect")}}