Definition
Geometry Interfaces Module Level 1 defines DOMRect
[Exposed=(Window,Worker),
Serializable,
LegacyWindowAlias=SVGRect]
interface DOMRect : DOMRectReadOnly {
constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
optional unrestricted double width = 0, optional unrestricted double height = 0);
[NewObject] static DOMRect fromRect(optional DOMRectInit other = {});
inherit attribute unrestricted double x;
inherit attribute unrestricted double y;
inherit attribute unrestricted double width;
inherit attribute unrestricted double height;
};
Methods and attributes that return objects implementing DOMRect
DOMRect()WindowControlsOverlay.getTitlebarAreaRect()WindowControlsOverlayGeometryChangeEvent.titlebarAreaRectViewport.segmentsCaretPosition.getClientRect()Element.getBoundingClientRect()Range.getBoundingClientRect()EditContext.characterBounds()DOMRect.fromRect()DOMRectList.item()DOMQuad.getBounds()SVGGraphicsElement.getBBox()SVGAnimatedRect.baseValSVGSVGElement.createSVGRect()SVGTextContentElement.getExtentOfChar()VirtualKeyboard.boundingRect
Referring IDL interfaces/dictionaries
Referring specifications
- Window Controls Overlay refers to
DOMRect - CSS Viewport Module Level 1 refers to
DOMRect - CSSOM View Module Level 1 refers to
DOMRect - EditContext API refers to
DOMRect - Scalable Vector Graphics (SVG) 2 refers to
DOMRect - VirtualKeyboard API refers to
DOMRect