blob: e2b6d61ccc58f44fa70c68d3fbbc7a167f3388ab [file] [log] [blame]
<!doctype html>
<meta charset="utf-8">
<title>Focus restoration outer</title>
<script>
let other = null;
let log = "outerlog:";
function getLog() {
return log;
}
window.onmessage = function(e) {
opener.postMessage(getLog() + e.data, "*");
};
window.onload = function() {
document.getElementsByTagName("iframe")[0].onfocus = function() {
log += "iframefocus,";
}
document.getElementsByTagName("iframe")[0].onblur = function() {
log += "iframeblur,";
}
document.body.onfocus = function() {
log += "bodyfocus,";
}
document.body.onblur = function() {
log += "bodyblur,";
}
}
</script>
<iframe src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/focus-restoration-in-different-site-iframes-inner-window.html">