Resize Iframes seamlessly

Recently I came across a very interesting solution to resize iframes seamlessly in the page. Iframes can be on same domain or cross domain. Its iframe-resizer maintained by David J. Bradshaw.

This solution works with the cross-document messaging; window.postMessage (IE8+). Though for IE8 support, ie8 polyfill(supplied with plugin) would need to used.

Only requirement is that the iframe.contentWindow.js(supplied with plugin) is needed to be included in the iframed page.

For IE8 conditional script can be used as follows:

For minimal setup, you would need to call the

And in iframedPage.html should have the iframeResizer.contentWindow(.min).js

Demo Github npm Download