Last active
January 13, 2016 10:48
-
-
Save dariocravero/feff0146bb1bcb9dfa7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iframe.contentWindow.addEventListener('beforeunload',() => this.middlewareCleanupWrapper() ); | |
if (this.observer) { | |
this.observer.disconnect(); | |
} | |
this.observer = new MutationObserver(mutations => { | |
iframe.parentElement.style.height = iframe.contentDocument.documentElement.offsetHeight + 'px'; | |
}); | |
this.observer.observe(iframe.contentDocument.body, { | |
attributes: true, | |
attributesFilter: ['style'], | |
subtree: true | |
}); | |
iframe.parentElement.style.height = iframe.contentDocument.documentElement.offsetHeight + 'px'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment