Created
April 7, 2022 19:15
-
-
Save beveradb/cc0807e579e33a28cc98d7e5762d3357 to your computer and use it in GitHub Desktop.
reverse-proxied-iframe-example-for-s8.html
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 src="/showcase/" id="showcaseiframe"></iframe> | |
<script> | |
// Resize iframe to fit contents on load so there's no inner scrollbar | |
var frame = document.getElementById("showcaseiframe"); | |
frame.onload = function() { | |
frame.style.height = frame.contentWindow.document.body.scrollHeight + 'px'; | |
frame.style.width = frame.contentWindow.document.body.scrollWidth+'px'; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment