Skip to content

Instantly share code, notes, and snippets.

@ento
Created March 24, 2010 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ento/342278 to your computer and use it in GitHub Desktop.
Save ento/342278 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta id="viewport" name="viewport" content="width=320, height=500" />
</head>
<body>
<div>Here comes an iframe.</div>
<iframe src="../336c3060c233f1662ad7461e0f0514543bc79093/included.html">
</iframe>
<div>End of iframe.</div>
</body>
</html>
<html>
<head>
<script type="text/javascript">
function growHeight() {
alert("Altering viewport");
parent.document.getElementById("viewport").setAttribute("content", "width=320, height=1000");
alert("Grew height to 1000");
}
</script>
</head>
<body onload="setTimeout('growHeight()', 3000); alert('called growHeight')">
<div>Inside iframe</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment