unstale

npm / iframe-resizer

iframe-resizer

What changed in iframe-resizer 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.

10 breaking16 deprecations5 new APIs and options4 behavior and defaults9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.1 on npm

iframe-resizer 544 changes

Breaking changes 10

  • Content changes are detected with newer browser APIs, improving performance and event detection and preventing one change from being picked up by multiple browser events.

    5.0.0upgrade guide

  • A consolidated tag attribute replaces the separate data-iframe-height and data-iframe-width attributes.

    5.0.0upgrade guide

  • A single option consolidates resize direction, accepting vertical, horizontal, both, or none.

    5.0.0upgrade guide

  • This method replaces getPageInfo and groups parent information into iframe, document, and viewport objects.

    5.0.0upgrade guide

  • The jQuery plugin is split out into its own package.

    5.0.0upgrade guide

  • The React package is renamed to this package name.

    5.0.0upgrade guide

  • Support for legacy browsers is dropped, enabling use of newer browser APIs for content change detection.

    5.0.0upgrade guide

  • This option has been removed because target browsers support setting these constraints on the iframe via CSS.

    5.0.0upgrade guide

  • This option has been removed because target browsers support setting these constraints on the iframe via CSS.

    5.0.0upgrade guide

  • This option has been removed because target browsers support setting these constraints on the iframe via CSS.

    5.0.0upgrade guide

Deprecations 16

  • The old direction-setting value is deprecated in favor of the direction option.

    5.0.0upgrade guide

  • This old tag attribute is deprecated in favor of the consolidated data-iframe-size tag.

    5.0.0upgrade guide

  • This old tag attribute is deprecated in favor of the consolidated data-iframe-size tag.

    5.0.0upgrade guide

  • This method is deprecated in favor of getParentProps.

    5.0.0upgrade guide

  • This option is deprecated; iframe-resizer inspects page layout to automatically select the best content size calculation method when the iframe is resized.

    5.0.0upgrade guide

  • The Parent Page API callback is renamed from onClosed.

    5.0.0upgrade guide

  • The Parent Page API callback is renamed from onClose.

    5.0.0upgrade guide

  • The Parent Page API callback is deprecated in favor of onBeforeClose.

    5.0.0upgrade guide

  • The Parent Page API callback is deprecated in favor of onAfterClose.

    5.0.0upgrade guide

  • The Parent Page API callback is deprecated in favor of onReady.

    5.0.0upgrade guide

  • The Parent Page API callback is renamed from onInit to align parent and child event names.

    5.0.0upgrade guide

  • The Child Page API method is renamed from size to resize to align with the Parent Page API.

    5.0.0upgrade guide

  • The Child Page API method is deprecated in favor of resize.

    5.0.0upgrade guide

  • The old direction-setting value is deprecated in favor of the direction option.

    5.0.0upgrade guide

  • The old direction-setting value is deprecated in favor of the direction option.

    5.0.0upgrade guide

  • This option is deprecated; iframe-resizer inspects page layout to automatically select the best content size calculation method when the iframe is resized.

    5.0.0upgrade guide

New APIs and options 5

  • The former combined package is split into a child package that can be upgraded independently and remains backwards compatible with previous versions.

    5.0.0upgrade guide

  • The former combined package is split into a parent package that can be upgraded independently and remains backwards compatible with previous versions.

    5.0.0upgrade guide

  • This option adjusts the value returned by the iframe for the dimension being resized; it accepts a positive or negative value.

    5.0.0upgrade guide

  • This event lets you modify or replace the content size before it is sent to the parent, replacing custom size functions on the calculation method options.

    5.0.0upgrade guide

  • TypeScript types are included in the Parent, Child, and React NPM packages.

    5.0.0upgrade guide

Behavior and default changes 4

  • The connection timeout warning now includes checkOrigin.

    5.5.8release notes

  • Iframe-resizer inspects the iframe html and body elements and ensures their height and width are set to auto to avoid resizing difficulties or loops.

    5.0.0upgrade guide

  • Iframe and parent page visibility are observed so resizing can be disabled while the iframe is not visible to the user.

    5.0.0upgrade guide

  • Same-domain iframe messages are passed directly via the browser DOM; postMessage is used only for cross-domain iframes.

    5.0.0upgrade guide

Fixes and other changes 9

  • Initialization is now supported for disconnected iframes.

    5.5.9release notes

  • Fixes rafId not being cleared after cancelAnimationFrame.

    5.5.9release notes

  • The calc mode warning message for a V4 parent page was fixed.

    5.5.8release notes

  • The library now checks for duplicate iframe IDs.

    5.5.8release notes

  • Event listeners in the child page are automatically torn down.

    5.5.8release notes

  • Visibility state now uses the last IntersectionObserver entry.

    5.5.8release notes

  • The height and width values returned by this event are now numbers instead of strings.

    5.0.0upgrade guide

  • The height and width values returned by this event are now numbers instead of strings.

    5.0.0upgrade guide

  • The height and width values returned by this event are now numbers instead of strings.

    5.0.0upgrade guide