Firefox Tomorrow

web api interface

DOMRectReadOnly

View on MDN ↗

Available in workers

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

Constructor

Instance properties

  • x Read only
    • : Returns the x coordinate of the DOMRectReadOnly’s origin.
  • y Read only
    • : Returns the y coordinate of the DOMRectReadOnly’s origin.
  • width Read only
    • : Returns the width of the DOMRectReadOnly.
  • height Read only
    • : Returns the height of the DOMRectReadOnly.
  • top Read only
    • : Returns the top coordinate value of the DOMRectReadOnly (usually the same as y).
  • right Read only
    • : Returns the right coordinate value of the DOMRectReadOnly (usually the same as x + width).
  • bottom Read only
    • : Returns the bottom coordinate value of the DOMRectReadOnly (usually the same as y + height).
  • left Read only
    • : Returns the left coordinate value of the DOMRectReadOnly (usually the same as x).

Static methods

Instance methods

  • toJSON()
    • : Returns a JSON representation of the DOMRectReadOnly object.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also