Created
July 5, 2019 13:11
-
-
Save DogAndHerDude/9bf4cb6a020d54d9567f50ac333fbf1a to your computer and use it in GitHub Desktop.
iFrame embed with fixed height
This file contains 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="https://app.calconic.com/api/embed/calculator/5d1bd4d7af0270002612d7a4" sandbox="allow-same-origin allow-forms allow-scripts allow-top-navigation allow-popups-to-escape-sandbox allow-popups" title="Calconic_ Calculator" name="Calconic_ Calculator" height="1676px" scrolling="no" style="width: 100%; border: 0; outline: none;"></iframe> | |
<script> | |
(function() { | |
window.addEventListener("message",function(t){ | |
var e="https://www.paypalobjects.com/api/checkout.4.0.141.js"; | |
if(!document.querySelector('script[src="'+e+'"]')&&t.data&&"LOAD_PAYPAL"===t.data.action){ | |
var a=document.createElement("script");a.src=e,a.async=!0,a.dataset={paypalCheckout:!0,noBridge:!0,state:"ppxo_meta",env:"production"},document.body.append(a) | |
}if(t.data&&"CALCONIC_UPDATE_HEIGHT"===t.data.action){ | |
var s=documenet.querySelector('iframe[src="https://app.calconic.com/api/embed/calculator/t.data.payload.id"]'); | |
if(s){s.height=t.data.payload.height}} | |
}); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment