DOMRectReadOnlyBaseline Widely availableThis feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.Learn moreSee full compatibilityReport feedbackNote: This feature is available in Web Workers. The DOMRectReadOnly interface specifies the standard properties (also used by DOMRect) to define a rectangle whose properties are immutable.Constructor DOMRectReadOnly() Defined to create a new DOMRectReadOnly object. Instance properties DOMRectReadOnly.x Read only Returns the x coordinate of the DOMRectReadOnly's origin. DOMRectReadOnly.y Read only Returns the y coordinate of the DOMRectReadOnly's origin. DOMRectReadOnly.width Read only Returns the width of the DOMRectReadOnly. DOMRectReadOnly.height Read only Returns the height of the DOMRectReadOnly. DOMRectReadOnly.top Read only Returns the top coordinate value of the DOMRectReadOnly (usually the same as y). DOMRectReadOnly.right Read only Returns the right coordinate value of the DOMRectReadOnly (usually the same as x + width). DOMRectReadOnly.bottom Read only Returns the bottom coordinate value of the DOMRectReadOnly (usually the same as y + height). DOMRectReadOnly.left Read only Returns the left coordinate value of the DOMRectReadOnly (usually the same as x). Static methods DOMRectReadOnly.fromRect() Creates a new DOMRectReadOnly object with a given location and dimensions. Instance methods DOMRectReadOnly.toJSON() Returns a JSON representation of the DOMRectReadOnly object. SpecificationsSpecificationGeometry Interfaces Module Level 1 # DOMRectBrowser compatibilitydesktopmobileChromeEdgeFirefoxOperaSafariChrome AndroidFirefox for AndroidOpera AndroidSafari on iOSSamsung InternetWebView AndroidWebView on iOSDOMRectReadOnlyChrome – Full supportChrome61moreToggle historyEdge – Full supportEdge79moreToggle historyFirefox – Full supportFirefox31moreToggle historyOpera – Full supportOpera48moreToggle historySafari – Full supportSafari10.1moreToggle historyChrome Android – Full supportChrome Android61moreToggle historyFirefox for Android – Full supportFirefox for Android31moreToggle historyOpera Android – Full supportOpera Android45moreToggle historySafari on iOS – Full supportSafari on iOS10.3moreToggle historySamsung Internet – Full supportSamsung Internet8.0moreToggle historyWebView Android – Full supportWebView Android61moreToggle historyWebView on iOS – Full supportWebView on iOS10.3moreToggle historyDOMRectReadOnly() constructorChrome – Full supportChrome61Toggle historyEdge – Full supportEdge79Toggle historyFirefox – Full supportFirefox62Toggle historyOpera – Full supportOpera48Toggle historySafari – Full supportSafari10.1Toggle historyChrome Android – Full supportChrome Android61Toggle historyFirefox for Android – Full supportFirefox for Android62Toggle historyOpera Android – Full supportOpera Android45Toggle historySafari on iOS – Full supportSafari on iOS10.3Toggle historySamsung Internet – Full supportSamsung Internet8.0Toggle historyWebView Android – Full supportWebView Android61Toggle historyWebView on iOS – Full supportWebView on iOS10.3Toggle historybottomChrome – Full supportChrome2Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox3Toggle historyOpera – Full supportOpera9.5Toggle historySafari – Full supportSafari4Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android10.1Toggle historySafari on iOS – Full supportSafari on iOS3.2Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android2Toggle historyWebView on iOS – Full supportWebView on iOS3.2Toggle historyfromRect() static methodChrome – Full supportChrome61Toggle historyEdge – Full supportEdge79Toggle historyFirefox – Full supportFirefox69Toggle historyOpera – Full supportOpera48Toggle historySafari – Full supportSafari10.1Toggle historyChrome Android – Full supportChrome Android61Toggle historyFirefox for Android – Full supportFirefox for Android79Toggle historyOpera Android – Full supportOpera Android45Toggle historySafari on iOS – Full supportSafari on iOS10.3Toggle historySamsung Internet – Full supportSamsung Internet8.0Toggle historyWebView Android – Full supportWebView Android61Toggle historyWebView on iOS – Full supportWebView on iOS10.3Toggle historyheightChrome – Full supportChrome2Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox3Toggle historyOpera – Full supportOpera9.5Toggle historySafari – Full supportSafari4Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android10.1Toggle historySafari on iOS – Full supportSafari on iOS3.2Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android2Toggle historyWebView on iOS – Full supportWebView on iOS3.2Toggle historyleftChrome – Full supportChrome2Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox3Toggle historyOpera – Full supportOpera9.5Toggle historySafari – Full supportSafari4Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android10.1Toggle historySafari on iOS – Full supportSafari on iOS3.2Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android2Toggle historyWebView on iOS – Full supportWebView on iOS3.2Toggle historyrightChrome – Full supportChrome2Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox3Toggle historyOpera – Full supportOpera9.5Toggle historySafari – Full supportSafari4Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android10.1Toggle historySafari on iOS – Full supportSafari on iOS3.2Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android2Toggle historyWebView on iOS – Full supportWebView on iOS3.2Toggle historytoJSONChrome – Full supportChrome61Toggle historyEdge – Full supportEdge79Toggle historyFirefox – Full supportFirefox62Toggle historyOpera – Full supportOpera48Toggle historySafari – Full supportSafari10.1Toggle historyChrome Android – Full supportChrome Android61Toggle historyFirefox for Android – Full supportFirefox for Android62Toggle historyOpera Android – Full supportOpera Android45Toggle historySafari on iOS – Full supportSafari on iOS10.3Toggle historySamsung Internet – Full supportSamsung Internet8.0Toggle historyWebView Android – Full supportWebView Android61Toggle historyWebView on iOS – Full supportWebView on iOS10.3Toggle historytopChrome – Full supportChrome2Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox3Toggle historyOpera – Full supportOpera9.5Toggle historySafari – Full supportSafari4Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android10.1Toggle historySafari on iOS – Full supportSafari on iOS3.2Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android2Toggle historyWebView on iOS – Full supportWebView on iOS3.2Toggle historywidthChrome – Full supportChrome2Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox3Toggle historyOpera – Full supportOpera9.5Toggle historySafari – Full supportSafari4Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android10.1Toggle historySafari on iOS – Full supportSafari on iOS3.2Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android2Toggle historyWebView on iOS – Full supportWebView on iOS3.2Toggle historyAvailable in workersChrome – Full supportChrome61Toggle historyEdge – Full supportEdge79Toggle historyFirefox – Full supportFirefox69Toggle historyOpera – Full supportOpera48Toggle historySafari – Full supportSafari10.1Toggle historyChrome Android – Full supportChrome Android61Toggle historyFirefox for Android – Full supportFirefox for Android79Toggle historyOpera Android – Full supportOpera Android45Toggle historySafari on iOS – Full supportSafari on iOS10.3Toggle historySamsung Internet – Full supportSamsung Internet8.0Toggle historyWebView Android – Full supportWebView Android61Toggle historyWebView on iOS – Full supportWebView on iOS10.3Toggle historyxChrome – Full supportChrome61Toggle historyEdge – Full supportEdge79Toggle historyFirefox – Full supportFirefox31Toggle historyOpera – Full supportOpera48Toggle historySafari – Full supportSafari10.1Toggle historyChrome Android – Full supportChrome Android61Toggle historyFirefox for Android – Full supportFirefox for Android31Toggle historyOpera Android – Full supportOpera Android45Toggle historySafari on iOS – Full supportSafari on iOS10.3Toggle historySamsung Internet – Full supportSamsung Internet8.0Toggle historyWebView Android – Full supportWebView Android61Toggle historyWebView on iOS – Full supportWebView on iOS10.3Toggle historyyChrome – Full supportChrome61Toggle historyEdge – Full supportEdge79Toggle historyFirefox – Full supportFirefox31Toggle historyOpera – Full supportOpera48Toggle historySafari – Full supportSafari10.1Toggle historyChrome Android – Full supportChrome Android61Toggle historyFirefox for Android – Full supportFirefox for Android31Toggle historyOpera Android – Full supportOpera Android45Toggle historySafari on iOS – Full supportSafari on iOS10.3Toggle historySamsung Internet – Full supportSamsung Internet8.0Toggle historyWebView Android – Full supportWebView Android61Toggle historyWebView on iOS – Full supportWebView on iOS10.3Toggle historySee also DOMPoint