Size cross domain iFrames to content with support for window/content resizing, and multiple iFrames. This library enables the automatic resizing of the height and width of both same and cross domain iFrames to fit their contained content. It provides a range of features to address the most common issues with using iFrames. Provides a range of page size calculation methods to support complex CSS layouts. Detects changes to the DOM that can cause the page to resize using MutationObserver. Detects events that can cause the page to resize (window resize, CSS animation and transition, orientation change and mouse events). Fixes in page links in iFrame and supports links between the iFrame and parent page. Works with ViewerJS to support PDF and ODF documents. The package contains two minified JavaScript files in the js folder. The first (iframeResizer.min.js) is for the page hosting the iFrames.

Features

  • Height and width resizing of the iFrame to content size
  • Works with multiple and nested iFrames
  • Domain authentication for cross domain iFrames
  • Simplified messaging between iFrame and host page via postMessage
  • Provides custom sizing and scrolling methods
  • Exposes parent position and viewport size to the iFrame

Project Samples

Project Activity

See All Activity >

Categories

Design

License

MIT License

Follow iFrame Resizer

iFrame Resizer Web Site

Other Useful Business Software
Earn up to 16% annual interest with Nexo. Icon
Earn up to 16% annual interest with Nexo.

Let your crypto work for you

Put idle assets to work with competitive interest rates, borrow without selling, and trade with precision. All in one platform. Geographic restrictions, eligibility, and terms apply.
Get started with Nexo.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of iFrame Resizer!

Additional Project Details

Operating Systems

Apple iPhone

Programming Language

JavaScript

Related Categories

JavaScript Design Software

Registered

2021-10-04