DOMRect

open class DOMRect(    var x: Double = definedExternally,     var y: Double = definedExternally,     var width: Double = definedExternally,     var height: Double = definedExternally) : DOMRectReadOnly, Serializable(source)

A DOMRect describes the size and position of a rectangle.

MDN Reference

Constructors

Link copied to clipboard
constructor(x: Double = definedExternally, y: Double = definedExternally, width: Double = definedExternally, height: Double = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val bottom: Double

The bottom read-only property of the DOMRectReadOnly interface returns the bottom coordinate value of the DOMRect.

Link copied to clipboard
open override var height: Double

The height property of the DOMRect interface represents the height of the rectangle.

Link copied to clipboard
open val left: Double

The left read-only property of the DOMRectReadOnly interface returns the left coordinate value of the DOMRect.

Link copied to clipboard
open val right: Double

The right read-only property of the DOMRectReadOnly interface returns the right coordinate value of the DOMRect.

Link copied to clipboard
open val top: Double

The top read-only property of the DOMRectReadOnly interface returns the top coordinate value of the DOMRect.

Link copied to clipboard
open override var width: Double

The width property of the DOMRect interface represents the width of the rectangle.

Link copied to clipboard
open override var x: Double

The x property of the DOMRect interface represents the x-coordinate of the rectangle, which is the horizontal distance between the viewport's left edge and the rectangle's origin.

Link copied to clipboard
open override var y: Double

The y property of the DOMRect interface represents the y-coordinate of the rectangle, which is the vertical distance between the viewport's top edge and the rectangle's origin.

Functions

Link copied to clipboard
fun toJSON(): JsAny

The DOMRectReadOnly method toJSON() returns a JSON representation of the DOMRectReadOnly object.