82 lines
3.8 KiB
HTML
82 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Child document</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
|
|
<style>
|
|
body {
|
|
background-color: lightskyblue;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body class="p-3">
|
|
<h1>Hello world from child iframe</h1>
|
|
|
|
<p>
|
|
<a href="https://www.example.com" class="parent-link">Click here</a> to visit an external site.
|
|
</p>
|
|
|
|
<p>Bacon ipsum dolor amet chislic short loin ham, chicken tail brisket meatloaf. Tongue short ribs ball tip short loin
|
|
spare ribs fatback pork beef. Turkey tail chuck ball tip shankle turducken tongue landjaeger alcatra salami cupim.
|
|
Tongue doner swine meatball. Turducken buffalo pig picanha porchetta corned beef.</p>
|
|
|
|
<p>Rump fatback strip steak bresaola. Prosciutto andouille jowl venison, strip steak picanha cupim leberkas beef ribs
|
|
corned beef capicola boudin ribeye turducken. Shoulder t-bone leberkas, ribeye boudin pastrami turducken. Jowl short
|
|
loin ball tip shoulder capicola shankle. Frankfurter cupim prosciutto, jowl pork chop salami picanha pancetta beef chuck
|
|
strip steak shoulder short loin pastrami.</p>
|
|
|
|
<p>Spare ribs turducken pork chop kevin picanha ham ground round biltong. Chuck andouille chicken, tenderloin tri-tip ham
|
|
hock ball tip meatball shank cow tongue brisket biltong venison. Jowl picanha pork loin, swine corned beef porchetta
|
|
short ribs jerky. Chislic pancetta rump tongue pork belly brisket jowl beef ribs chuck alcatra porchetta bresaola.
|
|
Pancetta chuck hamburger ribeye kielbasa fatback filet mignon pork chop spare ribs, swine venison shank. Burgdoggen pork
|
|
belly tenderloin salami short loin short ribs t-bone turducken buffalo. Pastrami frankfurter kielbasa pork chop alcatra
|
|
sausage turkey burgdoggen bresaola picanha.</p>
|
|
|
|
<p>Jerky cow pork belly porchetta, cupim chislic pork loin turducken spare ribs. Shankle turkey boudin turducken tongue
|
|
short loin. Beef shoulder burgdoggen prosciutto tail chislic boudin swine strip steak sausage meatloaf frankfurter
|
|
buffalo landjaeger. Capicola swine fatback meatball ham doner pork belly kevin prosciutto beef ribs rump tail andouille
|
|
sirloin corned beef. Cow pig alcatra, tenderloin jerky biltong buffalo chicken frankfurter boudin meatball andouille
|
|
tail leberkas venison.</p>
|
|
|
|
<p>Turducken fatback landjaeger kevin hamburger pork belly. Chicken porchetta shank kielbasa, rump flank pork chop. Pork
|
|
strip steak turducken tail brisket tongue. Boudin jerky bacon biltong ball tip tail strip steak fatback meatball chuck
|
|
turkey. Brisket meatball ham hock, bacon turducken beef leberkas. Pork chop pastrami turducken, ribeye pancetta alcatra
|
|
short ribs t-bone chislic bresaola chuck flank ground round. Hamburger salami bresaola biltong bacon cow, fatback pancetta.</p>
|
|
</body>
|
|
|
|
<script>
|
|
function sendHeight() {
|
|
const height = document.body.scrollHeight + 0; // add a little extra space
|
|
window.parent.postMessage({
|
|
cmd: "setHeight",
|
|
iframeHeight: height,
|
|
}, '*'); // ideally replace * with specific origin
|
|
}
|
|
|
|
function openParentLink(url) {
|
|
window.parent.postMessage({
|
|
cmd: "openUrl",
|
|
url,
|
|
}, '*'); // ideally replace * with specific origin
|
|
}
|
|
|
|
window.addEventListener("load", function () {
|
|
console.log("Everything loaded, including images and styles");
|
|
sendHeight();
|
|
});
|
|
|
|
window.addEventListener('resize', sendHeight);
|
|
|
|
document.querySelector(".parent-link").addEventListener("click", function (event) {
|
|
event.preventDefault();
|
|
openParentLink(this.getAttribute("href"));
|
|
});
|
|
|
|
</script>
|
|
|
|
</html> |