files/en-us/web/api/domrect/index.md
{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}}
A DOMRect describes the size and position of a rectangle.
The type of box represented by the DOMRect is specified by the method or property that returned it. For example, {{domxref("Range.getBoundingClientRect()")}} specifies the rectangle that bounds the content of the range using such objects.
It inherits from its parent, {{domxref("DOMRectReadOnly")}}.
{{InheritanceDiagram}}
DOMRect object.DOMRect inherits properties from its parent, {{domxref("DOMRectReadOnly")}}. The difference is that they are not read-only anymore.
DOMRect's origin (typically the top-left corner of the rectangle).DOMRect's origin (typically the top-left corner of the rectangle).DOMRect.DOMRect.DOMRect (has the same value as y, or y + height if height is negative).DOMRect (has the same value as x + width, or x if width is negative).DOMRect (has the same value as y + height, or y if height is negative).DOMRect (has the same value as x, or x + width if width is negative).DOMRect may also inherit static methods from its parent, {{domxref("DOMRectReadOnly")}}.
DOMRect object with a given location and dimensions.DOMRect may inherit methods from its parent, {{domxref("DOMRectReadOnly")}}.
{{Specifications}}
{{Compat}}