GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MDN
  • HTML: Markup language
  • Elements
  • Global attributes
  • Attributes
  • See all…
  • Responsive images
  • HTML cheatsheet
  • Date & time formats
  • See all…
  • SVG
  • MathML
  • XML
  • CSS: Styling language

This view

  • Original page
  • New address

GeezerVison is showing developer.mozilla.org — ResizeObserverSize - Web APIs | MDN

ResizeObserverSize

Baseline
Widely available

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

  • See full compatibility
  • Learn more

The ResizeObserverSize interface of the Resize Observer API is used by the ResizeObserverEntry interface to access the box sizing properties of the element being observed.

Note: In multi-column layout, which is a fragmented context, the sizing returned by ResizeObserverSize will be the size of the first column.

Instance properties

ResizeObserverSize.blockSize Read only

The length of the observed element's border box in the block dimension. For boxes with a horizontal writing-mode, this is the vertical dimension, or height; if the writing-mode is vertical, this is the horizontal dimension, or width.

ResizeObserverSize.inlineSize Read only

The length of the observed element's border box in the inline dimension. For boxes with a horizontal writing-mode, this is the horizontal dimension, or width; if the writing-mode is vertical, this is the vertical dimension, or height.

Note: For more explanation of writing modes and block and inline dimensions, read Handling different text directions.

Examples

In this example the ResizeObserverEntry.contentBoxSize property returns a ResizeObserverSize object. This is an array containing the sizing information for the content box of the observed element.

js
const resizeObserver = new ResizeObserver((entries) => {
  for (const entry of entries) {
    console.log(entry.contentBoxSize[0]); // a ResizeObserverSize
  }
});

resizeObserver.observe(divElem);

Specifications

Specification
Resize Observer
# resizeobserversize

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on Nov 7, 2025 by MDN contributors.

View this page on GitHub • Report a problem with this content
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.