Baseline Widely available
Note: This feature is available in Web Workers.
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, Range.getBoundingClientRect()
specifies the rectangle that bounds the content of the range using such objects.
It inherits from its parent, DOMRectReadOnly
.
DOMRect()
Creates a new DOMRect
object.
DOMRect
inherits properties from its parent, DOMRectReadOnly
. The difference is that they are not read-only anymore.
DOMRect.x
The x coordinate of the DOMRect
's origin (typically the top-left corner of the rectangle).
DOMRect.y
The y coordinate of the DOMRect
's origin (typically the top-left corner of the rectangle).
DOMRect.width
The width of the DOMRect
.
DOMRect.height
The height of the DOMRect
.
DOMRectReadOnly.top
Returns the top coordinate value of the DOMRect
(has the same value as y
, or y + height
if height
is negative).
DOMRectReadOnly.right
Returns the right coordinate value of the DOMRect
(has the same value as x + width
, or x
if width
is negative).
DOMRectReadOnly.bottom
Returns the bottom coordinate value of the DOMRect
(has the same value as y + height
, or y
if height
is negative).
DOMRectReadOnly.left
Returns the left coordinate value of the DOMRect
(has the same value as x
, or x + width
if width
is negative).
DOMRect
may also inherit static methods from its parent, DOMRectReadOnly
.
DOMRect.fromRect()
Creates a new DOMRect
object with a given location and dimensions.
DOMRect
may inherit methods from its parent, DOMRectReadOnly
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3