Send message to parent frame with document height when embedded
This commit is contained in:
parent
c45e2b64c5
commit
52f01949d3
@ -254,4 +254,17 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Send message to parent frame with our height so they can adjust the iframe
|
||||||
|
if (isset($_GET["embed"])) {
|
||||||
|
?>
|
||||||
|
<script nonce="<?php echo $SECURE_NONCE; ?>">
|
||||||
|
window.addEventListener("load", function () {
|
||||||
|
window.postMessage(document.documentElement.scrollHeight + "px", "*");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user