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