DOMRect: DOMRect() constructor
Geometry Interfaces
Geometry Interfaces
The DOMRect() constructor creates a new DOMRect object.
Syntax
new DOMRect(x, y, width, height)
Parameters
- x
- : The
xcoordinate of theDOMRect's origin. - y
- : The
ycoordinate of theDOMRect's origin. - width
- : The width of the
DOMRect. - height
- : The height of the
DOMRect.
Return value
A new DOMRect object.
Specifications
Browser compatibility
See also
- DOMPoint
- DOMRect
- DOMRect.fromRect()