Testing

ResizeObserver: Browser Support, Features, Known Issues

ResizeObserver works in Chrome 64+, Edge 79+, Firefox 69+, Safari 13.1+ macOS, Safari 13.4+ iOS, Opera 52+, and Samsung Internet 9.2+. IE has no support.

Author

Prince Dewani

May 5, 2026

ResizeObserver is a W3C JavaScript API that reports changes to an element's content box, border box, or device-pixel content box. It works in Chrome 64+, Edge 79+, Firefox 69+, Safari 13.1+ on macOS, Safari 13.4+ on iOS, Opera 52+, and Samsung Internet 9.2+, while Internet Explorer never supported it.

This guide covers what ResizeObserver is, the browsers that support it, the key features, the common use cases, how to check browser support, and the known issues.

What is ResizeObserver?

ResizeObserver is a JavaScript interface that reports changes to a DOM element's content box, border box, or device-pixel content box. The W3C CSS Working Group edits the spec, and pages access the API through the global ResizeObserver constructor and its observe, unobserve, and disconnect methods.

Which browsers does ResizeObserver support?

ResizeObserver is available in every modern browser, with global browser support of about 96%. Internet Explorer is the only major browser that never added it, and Opera Mini still has no support either.

Loading browser compatibility data...

ResizeObserver compatibility in Chrome

Chrome supports ResizeObserver from Chrome 64 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 54 to 63 had ResizeObserver disabled by default behind the chrome://flags/#enable-experimental-web-platform-features flag, and Chrome 4 to 53 did not support it at all. Every Chrome channel ships the API today, including the Chrome WebView used by Android apps.

ResizeObserver compatibility in Edge

Microsoft Edge supports ResizeObserver from Edge 79 on Windows, macOS, Linux, and Android. Edge 79 was the first Chromium-based release, so the API mirrors Chrome from that version on. The legacy EdgeHTML versions 12 to 18 never added ResizeObserver, and Internet Explorer never had it either.

ResizeObserver compatibility in Firefox

Firefox supports ResizeObserver from Firefox 69 on Windows, macOS, Linux, and Android. Firefox 2 to 68 did not support the API and offered no about:config preference to enable it. Firefox for Android tracks the desktop release train, so Android Firefox 79 and later includes ResizeObserver as well.

ResizeObserver compatibility in Safari

Safari supports ResizeObserver from Safari 13.1 on macOS and from Safari 13.4 on iOS and iPadOS. Safari 13 had ResizeObserver disabled by default, while Safari 3.1 to 12.1 on macOS and Safari 3.2 to 13.3 on iOS did not support it at all. Every Safari release after 13.4 ships the API by default, including Safari on visionOS.

ResizeObserver compatibility in Opera

Opera supports ResizeObserver from Opera 52 on Windows, macOS, Linux, and ChromeOS. Opera 41 to 51 had ResizeObserver disabled by default behind a flag, and Opera 9 to 40 did not support it. Opera Mobile picked up the API from Opera Mobile 80, while Opera Mini does not expose ResizeObserver in any version.

ResizeObserver compatibility in Samsung Internet

Samsung Internet supports ResizeObserver from Samsung Internet 9.2 on Galaxy phones and tablets. Older Samsung Internet 4 to 9.0 builds did not include the API. Every Galaxy device shipping with Android 9 or later runs a Samsung Internet release that supports ResizeObserver out of the box.

ResizeObserver compatibility in Android Browser

Chrome for Android, Firefox for Android, and the WebView component used by Android apps all support ResizeObserver from their Chromium 64 and Firefox 69 base versions on. The legacy stock Android Browser on Android 4.4 and earlier did not support ResizeObserver, and that browser is no longer shipped.

ResizeObserver compatibility in Internet Explorer

Internet Explorer 6 to 11 do not support ResizeObserver in any version. Microsoft has retired Internet Explorer, and the modern replacement is Chromium-based Edge, which exposes ResizeObserver from Edge 79. Web apps that still target IE need a polyfill such as juggle/resize-observer.

Note

Note: ResizeObserver behaves differently across older Safari and mobile browsers. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of ResizeObserver?

ResizeObserver gives a page a callback every time an element's box changes size, with measurements that match the CSS box model rather than the viewport. The API surface is small and follows the same pattern as MutationObserver and IntersectionObserver.

  • new ResizeObserver(callback): Creates an observer that fires the callback every time an observed element's size changes. The callback receives an array of ResizeObserverEntry objects and the ResizeObserver instance itself.
  • observe(target, options): Starts watching a DOM element or SVG element. The optional options object accepts a box property of content-box, border-box, or device-pixel-content-box.
  • unobserve(target): Stops watching one element while leaving the rest of the targets active on the same observer.
  • disconnect(): Stops every observation on the observer in one call. Use it when a component unmounts or a route changes.
  • ResizeObserverEntry: Reports the new dimensions through contentRect, contentBoxSize, borderBoxSize, devicePixelContentBoxSize, and the target element. Each Size property is an array because writing-mode flips block and inline axes.
  • Element-scoped tracking: Reports size changes for any DOM box, not just the viewport. That covers iframes, custom elements, dynamic flex children, and SVG groups.
  • Box-model accuracy: Reports the content box, border box, or device-pixel content box, so measurements match what CSS already calculated. No double layout pass is needed.
  • Resize-loop guard: The browser fires an error event with the message ResizeObserver loop completed with undelivered notifications when callbacks fight each other. The guard prevents the page from locking up.

What are the common use cases of ResizeObserver?

ResizeObserver shines anywhere a layout has to react to a container's size rather than the viewport's size. Production code uses it for responsive components, scroll preservation, canvas resizing, and runtime layout switches.

  • Per-element media queries: Switch a component layout when its parent container crosses a breakpoint. CSS container queries cover most cases, but ResizeObserver still wins when the breakpoint logic depends on JavaScript.
  • Chat-window scroll positioning: Pin a conversation to the latest message when the input grows or the window resizes. The observer recalculates scrollTop on every size change so the user never loses context.
  • Canvas and WebGL framebuffer resizing: Match the drawing buffer to the canvas element's CSS box. Reading devicePixelContentBoxSize avoids the half-pixel blur that comes from rounding contentRect on high-DPI displays.
  • Custom element layout: Notify a Web Component when the host element changes size. Children can re-render columns, virtualized lists, or charts without listening to window.resize.
  • Photo grids and masonry layouts: Add or remove tiles to keep the grid full whenever the container width changes. The observer fires once per real size change instead of on every animation frame.
  • Flex row to column switch: Reflow a toolbar or card row into a stacked column when the parent narrows. The observer handles the breakpoint inside the component instead of leaking it to a global media query.
...

How do you check if a browser supports ResizeObserver?

You check ResizeObserver support by feature-testing the global constructor before you call it. The check works on any page and takes about thirty seconds in DevTools.

  • Open DevTools: Press F12 or right-click the page and pick Inspect, then switch to the Console tab.
  • Test the global: Type typeof ResizeObserver and press Enter. A modern browser prints "function"; an unsupported browser prints "undefined".
  • Construct an observer: Run new ResizeObserver(() => ) and confirm no exception fires. The observer constructs synchronously when the API exists.
  • Observe an element: Pass an element to the observer with observer.observe(document.body) and resize the window. Each resize logs a callback fire with a ResizeObserverEntry array.
  • Plan a fallback: If step 2 prints "undefined", ship the juggle/resize-observer polyfill or fall back to window.resize for the rare visitor on Safari 12 or older.

The same logic fits into a script tag for production. Paste this snippet into the DevTools console of Chrome, Firefox, Safari, or Edge to confirm support and watch live size updates.

// Paste this into the DevTools console to confirm ResizeObserver support
// and watch the .card element react to size changes.
if ("ResizeObserver" in window) {
  console.log("ResizeObserver is available.");

  const card = document.querySelector(".card") || document.body;
  const observer = new ResizeObserver((entries) => {
    for (const entry of entries) {
      const { inlineSize, blockSize } = entry.contentBoxSize[0];
      console.log("card size", Math.round(inlineSize), "x", Math.round(blockSize));
    }
  });

  observer.observe(card);
} else {
  console.log("ResizeObserver is not supported. Fall back to window.resize.");
}

What are the known issues with ResizeObserver?

ResizeObserver has the same coverage gap as most web APIs that arrived after Chrome 64, plus one signature pitfall: the observer callback can trigger another size change that wakes the same callback. Plan around the loop and the test-environment gaps.

  • ResizeObserver loop error: Browsers fire an ErrorEvent with the message ResizeObserver loop completed with undelivered notifications when callback work resizes a shallow ancestor. Wrap mutating work in requestAnimationFrame to defer it to the next frame.
  • ResizeObserver loop limit exceeded warning: Webpack dev server, Cypress, and a few Chrome extensions surface this message when iframes resize repeatedly. The warning is harmless, but it pollutes logs and can flag false test failures.
  • jsdom does not implement ResizeObserver: Jest and Vitest test environments based on jsdom throw ReferenceError: ResizeObserver is not defined in unit tests. Stub the API with a Jest manual mock or import the juggle/resize-observer polyfill in your test setup file.
  • Safari 13.0 had ResizeObserver disabled by default: macOS Safari 13.0 shipped the code behind a flag, so the API became reliable from Safari 13.1 on macOS and Safari 13.4 on iOS. Treat anything older as unsupported even if "ResizeObserver" in window returns true.
  • contentBoxSize is an array, not an object: Writing-mode flips block and inline axes, so the spec returns ResizeObserverSize entries inside an array. Older code that reads entry.contentBoxSize.inlineSize directly throws TypeError on Firefox 79 and later.
  • Worker threads cannot create ResizeObserver: The constructor lives on the Window object only. Pages that need size data inside a Web Worker must postMessage the dimensions from the main thread.
  • Internet Explorer never adds support: IE 11 and earlier do not implement ResizeObserver. Sites that still target IE must polyfill the API or fall back to window.resize plus getBoundingClientRect, which costs an extra layout pass.

In my experience, the loop error during Cypress runs is the trickiest one to silence. The fix that has stuck is wrapping every page mutation that lives inside a ResizeObserver callback in requestAnimationFrame, then ignoring the harmless warning in the cypress.config event hook.

...

Citations

All ResizeObserver version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests