Home / Layout / iFrame Resizer - Automagically resizing iFrame
iFrame Resizer - Automagically resizing iFrame

iFrame Resizer - Automagically resizing iFrame

Download Demo
  • Overview
  • Documents
User Rating: 4.9/5 ( 3 votes)
Your Rating:

iFrame Resizer enables the automatic resizing of the height and width of both same and cross domain iFrames to fit the contained content.

It uses postMessage to pass messages between the host page and the iFrame and when available MutationObserver to detect DOM changes, with a fallback to setInterval for IE8-10.

The code also detects browser events that can cause the content to resize; provides functions to allow the iFrame to set a custom size and close itself. Plus it supports having multiple iFrames on the host-page and additionally provides for the sending of simple messages from the iFrame to the parent page.

Source: davidjbradshaw.github.io

Scroll To Top