2023-04-25 13:25:59 +02:00

44 lines
1.2 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>iFrame message passing test</title>
<meta name="description" content="iFrame message passing test">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
*, *:before, *:after {box-model: border-box;}
a { float:right; margin-left:10px;}
h2 {margin-top: 0;}
</style>
</head>
<body>
<h2>Nested iFrame</h2>
<p>Resize window or click one of the links in the nested iFrame to watch it resize.</p>
<div style="margin:20px;">
<iframe id="nestedIFrame" src="frame.content.html" width="100%" scrolling="no"></iframe>
</div>
<p id="callback">
</p>
<script type="text/javascript" src="../../js/iframeResizer.contentWindow.min.js"></script>
<script src="jquery.js"></script>
<script type="text/javascript" src="../../js/iframeResizer.min.js"></script>
<script type="text/javascript" src="../../js/ie8.polyfils.min.js"></script>
<script type="text/javascript">
iFrameResize({
log: true, // Enable console logging
onResized: function (messageData) { // Callback fn when message is received
setTimeout(function () { parentIFrame.sendMessage('nested') }, 50);
}
});
</script>
</body>
</html>