# What changed in iframe-resizer

> 44 changes in iframe-resizer 5 from its official release notes, upgrade guides and advisories: 10 breaking, 16 deprecations, 5 new APIs and options. Each one cited. Sources checked 2026-10-21. HTML: https://unstale.sh/npm/iframe-resizer/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## iframe-resizer 5

### Breaking changes

- 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.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- A consolidated tag attribute replaces the separate data-iframe-height and data-iframe-width attributes. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- A single option consolidates resize direction, accepting vertical, horizontal, both, or none. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This method replaces getPageInfo and groups parent information into iframe, document, and viewport objects. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The jQuery plugin is split out into its own package. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The React package is renamed to this package name. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- Support for legacy browsers is dropped, enabling use of newer browser APIs for content change detection. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This option has been removed because target browsers support setting these constraints on the iframe via CSS. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This option has been removed because target browsers support setting these constraints on the iframe via CSS. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This option has been removed because target browsers support setting these constraints on the iframe via CSS. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)

### Deprecations

- The old direction-setting value is deprecated in favor of the direction option. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This old tag attribute is deprecated in favor of the consolidated data-iframe-size tag. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This old tag attribute is deprecated in favor of the consolidated data-iframe-size tag. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This method is deprecated in favor of getParentProps. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- 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.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Parent Page API callback is renamed from onClosed. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Parent Page API callback is renamed from onClose. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Parent Page API callback is deprecated in favor of onBeforeClose. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Parent Page API callback is deprecated in favor of onAfterClose. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Parent Page API callback is deprecated in favor of onReady. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Parent Page API callback is renamed from onInit to align parent and child event names. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Child Page API method is renamed from size to resize to align with the Parent Page API. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The Child Page API method is deprecated in favor of resize. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The old direction-setting value is deprecated in favor of the direction option. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The old direction-setting value is deprecated in favor of the direction option. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- 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.0) — [upgrade guide](https://iframe-resizer.com/upgrade)

### New APIs and options

- The former combined package is split into a child package that can be upgraded independently and remains backwards compatible with previous versions. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The former combined package is split into a parent package that can be upgraded independently and remains backwards compatible with previous versions. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- This option adjusts the value returned by the iframe for the dimension being resized; it accepts a positive or negative value. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- 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.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- TypeScript types are included in the Parent, Child, and React NPM packages. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)

### Behavior and default changes

- The connection timeout warning now includes checkOrigin. (5.5.8) — [release notes](https://github.com/davidjbradshaw/iframe-resizer/releases/tag/v5.5.8)
- 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.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- Iframe and parent page visibility are observed so resizing can be disabled while the iframe is not visible to the user. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- Same-domain iframe messages are passed directly via the browser DOM; postMessage is used only for cross-domain iframes. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)

### Fixes and other changes

- Initialization is now supported for disconnected iframes. (5.5.9) — [release notes](https://github.com/davidjbradshaw/iframe-resizer/releases/tag/v5.5.9)
- Fixes rafId not being cleared after cancelAnimationFrame. (5.5.9) — [release notes](https://github.com/davidjbradshaw/iframe-resizer/releases/tag/v5.5.9)
- The calc mode warning message for a V4 parent page was fixed. (5.5.8) — [release notes](https://github.com/davidjbradshaw/iframe-resizer/releases/tag/v5.5.8)
- The library now checks for duplicate iframe IDs. (5.5.8) — [release notes](https://github.com/davidjbradshaw/iframe-resizer/releases/tag/v5.5.8)
- Event listeners in the child page are automatically torn down. (5.5.8) — [release notes](https://github.com/davidjbradshaw/iframe-resizer/releases/tag/v5.5.8)
- Visibility state now uses the last IntersectionObserver entry. (5.5.8) — [release notes](https://github.com/davidjbradshaw/iframe-resizer/releases/tag/v5.5.8)
- The height and width values returned by this event are now numbers instead of strings. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The height and width values returned by this event are now numbers instead of strings. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
- The height and width values returned by this event are now numbers instead of strings. (5.0.0) — [upgrade guide](https://iframe-resizer.com/upgrade)
