Skip to main content

interface DOMRectReadOnly

unstable

The DOMRectReadOnly interface specifies the standard properties (also used by DOMRect) to define a rectangle whose properties are immutable.

MDN

Properties #

#bottom: number
readonly

The bottom read-only property of the DOMRectReadOnly interface returns the bottom coordinate value of the DOMRect. (Has the same value as y + height, or y if height is negative.)

MDN Reference

#height: number
readonly

The height read-only property of the DOMRectReadOnly interface represents the height of the DOMRect.

MDN Reference

#left: number
readonly

The left read-only property of the DOMRectReadOnly interface returns the left coordinate value of the DOMRect. (Has the same value as x, or x + width if width is negative.)

MDN Reference

#right: number
readonly

The right read-only property of the DOMRectReadOnly interface returns the right coordinate value of the DOMRect. (Has the same value as x + width, or x if width is negative.)

MDN Reference

#top: number
readonly

The top read-only property of the DOMRectReadOnly interface returns the top coordinate value of the DOMRect. (Has the same value as y, or y + height if height is negative.)

MDN Reference

#width: number
readonly

The width read-only property of the DOMRectReadOnly interface represents the width of the DOMRect.

MDN Reference

#x: number
readonly

The x read-only property of the DOMRectReadOnly interface represents the x coordinate of the DOMRect's origin.

MDN Reference

#y: number
readonly

The y read-only property of the DOMRectReadOnly interface represents the y coordinate of the DOMRect's origin.

MDN Reference

Methods #

#toJSON(): any

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

MDN Reference

variable DOMRectReadOnly

unstable

The DOMRectReadOnly interface specifies the standard properties (also used by DOMRect) to define a rectangle whose properties are immutable.

MDN

Properties #

Methods #

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

MDN Reference

Did you find what you needed?

Privacy policy