DOMRectList

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

The DOMRectList interface represents a collection of DOMRect objects, typically used to hold the rectangles associated with a particular element, like bounding boxes returned by methods such as getClientRects(). It provides access to each rectangle in the list via its index, along with a length property that indicates the total number of rectangles in the list.

Note: DOMRectList exists for compatibility with legacy Web content and is not recommended to be used when creating new APIs.

Instance properties

DOMRectList.length Read only

A read-only property that returns the total number of DOMRect objects in the DOMRectList.

Instance methods

DOMRectList.item

Returns the DOMRect object at the specified index. If the index is out of range, it returns null.

Specifications

Specification
Geometry Interfaces Module Level 1
# DOMRectList

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
DOMRectList
Chrome – No support
Chrome 2 – 60 (Release date: 2009-05-21)
altname
altname Alternate name: ClientRectList
Chrome – Full support
Chrome 61 (Release date: 2017-09-05)
footnote Full support
Edge – No support
Edge 12 – 18 (Release date: 2015-07-29)
altname
altname Alternate name: ClientRectList
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox 3 – 26 (Release date: 2008-06-17)
altname
altname Alternate name: ClientRectList
Firefox – Full support
Firefox 27 (Release date: 2014-02-04)
footnote Full support
Opera – No support
Opera 12.1 – 47 (Release date: 2012-11-20)
altname
altname Alternate name: ClientRectList
Opera – Full support
Opera 48 (Release date: 2017-09-27)
footnote Full support
Safari – No support
Safari 4 – 10.1 (Release date: 2009-06-08)
altname
footnote Removed in 11 and later
altname Alternate name: ClientRectList
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – No support
Chrome Android 18 – 60 (Release date: 2012-06-27)
altname
altname Alternate name: ClientRectList
Chrome Android – Full support
Chrome Android 61 (Release date: 2017-09-05)
footnote Full support
Firefox for Android – No support
Firefox for Android 4 – 26 (Release date: 2011-03-29)
altname
altname Alternate name: ClientRectList
Firefox for Android – Full support
Firefox for Android 27 (Release date: 2014-02-04)
footnote Full support
Opera Android – No support
Opera Android 12.1 – 44 (Release date: 2012-10-09)
altname
altname Alternate name: ClientRectList
Opera Android – Full support
Opera Android 45 (Release date: 2018-02-15)
footnote Full support
Safari on iOS – No support
Safari on iOS 3 – 10.3 (Release date: 2009-06-17)
altname
footnote Removed in 11 and later
altname Alternate name: ClientRectList
Safari on iOS – Full support
Safari on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Samsung Internet – No support
Samsung Internet 1 – 7.4 (Release date: 2013-04-27)
altname
altname Alternate name: ClientRectList
Samsung Internet – Full support
Samsung Internet 8 (Release date: 2018-07-18)
footnote Full support
WebView Android – No support
WebView Android 4.4 – 60 (Release date: 2013-12-09)
altname
altname Alternate name: ClientRectList
WebView Android – Full support
WebView Android 61 (Release date: 2017-09-05)
footnote Full support
WebView on iOS – No support
WebView on iOS 3 – 10.3 (Release date: 2009-06-17)
altname
footnote Removed in 11 and later
altname Alternate name: ClientRectList
WebView on iOS – Full support
WebView on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
item
Chrome – Full support
Chrome 2 (Release date: 2009-05-21)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 3 (Release date: 2008-06-17)
footnote Full support
Opera – Full support
Opera 12.1 (Release date: 2012-11-20)
footnote Full support
Safari – Full support
Safari 4 (Release date: 2009-06-08)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 4 (Release date: 2011-03-29)
footnote Full support
Opera Android – Full support
Opera Android 12.1 (Release date: 2012-10-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 3 (Release date: 2009-06-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 3 (Release date: 2009-06-17)
footnote Full support
length
Chrome – Full support
Chrome 2 (Release date: 2009-05-21)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 3 (Release date: 2008-06-17)
footnote Full support
Opera – Full support
Opera 12.1 (Release date: 2012-11-20)
footnote Full support
Safari – Full support
Safari 4 (Release date: 2009-06-08)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 4 (Release date: 2011-03-29)
footnote Full support
Opera Android – Full support
Opera Android 12.1 (Release date: 2012-10-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 3 (Release date: 2009-06-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 3 (Release date: 2009-06-17)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Uses a non-standard name
Has more compatibility info.

See also