Classes
DOMRect
Extends
Constructors
new DOMRect()
new DOMRect(x
?, y
?, width
?, height
?): DOMRect
Parameters
Parameter | Type |
---|---|
x ? | number |
y ? | number |
width ? | number |
height ? | number |
Returns
Overrides
Properties
Property | Type | Description | Overrides |
---|---|---|---|
height | number | MDN Reference | DOMRectReadOnly .height |
width | number | MDN Reference | DOMRectReadOnly .width |
x | number | MDN Reference | DOMRectReadOnly .x |
y | number | MDN Reference | DOMRectReadOnly .y |
Accessors
bottom
get
bottom(): number
Returns
number
Inherited from
left
get
left(): number
Returns
number
Inherited from
right
get
right(): number
Returns
number
Inherited from
top
get
top(): number
Returns
number
Inherited from
Methods
toJSON()
toJSON(): object
Returns
object
Name | Type |
---|---|
bottom | number |
height | number |
left | number |
right | number |
top | number |
width | number |
x | number |
y | number |
Inherited from
fromRect()
static
fromRect(o
): DOMRect
Parameters
Parameter | Type |
---|---|
o | DOMRectInit |