---
title: "ResizeObserverEntry | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface ResizeObserverEntry

The **`ResizeObserverEntry`** interface represents the object passed to the ResizeObserver() constructor's callback function, which allows you to access the new dimensions of the Element or SVGElement being observed.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry)

interface ResizeObserverEntry {  
    [borderBoxSize](#borderboxsize): readonly [ResizeObserverSize](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ResizeObserverSize/)\[\];  
    [contentBoxSize](#contentboxsize): readonly [ResizeObserverSize](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ResizeObserverSize/)\[\];  
    [contentRect](#contentrect): [DOMRectReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMRectReadOnly/);  
    [devicePixelContentBoxSize](#devicepixelcontentboxsize): readonly [ResizeObserverSize](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ResizeObserverSize/)\[\];  
    [target](#target): [Element](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Element/);  
}

##### Index

### Properties[](#properties)

[borderBoxSize](#borderboxsize) [contentBoxSize](#contentboxsize) [contentRect](#contentrect) [devicePixelContentBoxSize](#devicepixelcontentboxsize) [target](#target)

## Properties[](#properties-1)

### `Readonly`borderBoxSize[](#borderboxsize)

borderBoxSize: readonly [ResizeObserverSize](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ResizeObserverSize/)\[\]

The **`borderBoxSize`** read-only property of the ResizeObserverEntry interface returns an array containing the new border box size of the observed element when the callback is run.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/borderBoxSize)

### `Readonly`contentBoxSize[](#contentboxsize)

contentBoxSize: readonly [ResizeObserverSize](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ResizeObserverSize/)\[\]

The **`contentBoxSize`** read-only property of the ResizeObserverEntry interface returns an array containing the new content box size of the observed element when the callback is run.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/contentBoxSize)

### `Readonly`contentRect[](#contentrect)

contentRect: [DOMRectReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DOMRectReadOnly/)

The **`contentRect`** read-only property of the ResizeObserverEntry interface returns a DOMRectReadOnly object containing the new size of the observed element when the callback is run. Note that this is better supported than ResizeObserverEntry.borderBoxSize or ResizeObserverEntry.contentBoxSize, but it is left over from an earlier implementation of the Resize Observer API, is still included in the spec for web compat reasons, and may be deprecated in future versions.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/contentRect)

### `Readonly`devicePixelContentBoxSize[](#devicepixelcontentboxsize)

devicePixelContentBoxSize: readonly [ResizeObserverSize](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ResizeObserverSize/)\[\]

The **`devicePixelContentBoxSize`** read-only property of the ResizeObserverEntry interface returns an array containing the size in device pixels of the observed element when the callback is run.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/devicePixelContentBoxSize)

### `Readonly`target[](#target)

target: [Element](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Element/)

The **`target`** read-only property of the ResizeObserverEntry interface returns a reference to the Element or SVGElement that is being observed.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/target)
