summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/focus/support/iframe-contentwindow-focus-with-same-as-top-intermediate-frame-outer.html
blob: 71cfe78c0d7614f585a7dcecb3b6c12e6698d321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!doctype html>
<meta charset="utf-8">
<title>iframe.contentWindow.focus() with same-as-top intermediate frame outer</title>
<script>
let log = "";
function getLog() {
    return log;
}
window.onmessage = function(e) {
    log += e.data;
};
window.onload = function() {
    log += "outeronload;";
        log += "outeractivelement:" + document.activeElement.localName + ";";
    document.getElementsByTagName("iframe")[0].contentWindow.postMessage("starttest;", "*");
    opener.step_timeout(function() {
        log += "outeractivelement:" + document.activeElement.localName + ";";
        opener.postMessage(getLog(), "*");
    }, 2000);
}
</script>
<iframe src="iframe-contentwindow-focus-with-same-as-top-intermediate-frame-middle.sub.html"></iframe>