Skip to main content

DOMRect-1

DOMRect: {
(x?, y?, width?, height?): DOMRect;
prototype: DOMRect;
fromRect: DOMRect;
};

Type Declaration

Parameters

ParameterType
x?number
y?number
width?number
height?number

Returns

DOMRect

prototype

prototype: DOMRect;

fromRect()

fromRect(other?): DOMRect;

The fromRect() static method of the DOMRect object creates a new DOMRect object with a given location and dimensions.

MDN Reference

Parameters

ParameterType
other?DOMRectInit

Returns

DOMRect