fromRect

fun fromRect(other: DOMRectReadOnly = definedExternally): DOMRectReadOnly(source)

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

MDN Reference