Cross-Domain dynamic resizing of iFrames
Switch branches/tags
Nothing to show
Latest commit cf15e2d Jun 5, 2012 @Ocramius Removing unused variable

Cross-Domain iFrame resizing

This project aims to be a simple to use Javascript implementation of the problems we usually meet when working with cross-domain iFrames. It is not a solution for the cases where you can't edit both the contents of the parent window and the iframe placed on the separate domain. Current logic uses polling and hash, so this would eventually break hash-based routing in your JS apps.


  • jQuery >= 1.2.6 in both iFrame and parent window (you can strip this requirement if you want. jQuery is just used to listen to the location hash change event and to overload window.onload)


  • clone/submodule this repository into your project
  • load js/FrameManager.js from the document that contains the frames
  • load js/HeightPublisher.js from the frame that is dynamically resized


The logic and code for this application was mainly taken from the following concepts: