blob: 73f85855cdecd546cb1363ef0463014b8e15d317 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>test</title>
<script>
window.addEventListener("load", populateIframe);
function populateIframe() {
html = "<!doctype html>" +
"<html>" +
" <head>" +
" <meta http-equiv=\"refresh\" content=\"0\">" +
" <title>meta refresh in iframe reloads parent</title>" +
" </head>" +
" <body>" +
" iframe" +
" </body>" +
"</html>";
doc = document.getElementById("frame").contentDocument;
// Opening the IFrame's document to write to it will cause the IFrame's
// document's URL to be set to the URL of the parent document
doc.open();
doc.write(html);
doc.close();
}
</script>
</head>
<body>
<div>parent</div>
<iframe id="frame"></iframe>
</body>
</html>