iframe-focus-with-different-site-intermediate-frame-outer.sub.html (818B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>iframe.focus() with different-site 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 setTimeout(function() { 17 log += "outeractivelement:" + document.activeElement.localName + ";"; 18 opener.postMessage(getLog(), "*"); 19 }, 3000); 20 } 21 </script> 22 <iframe allow="focus-without-user-activation" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/iframe-focus-with-different-site-intermediate-frame-middle.sub.html"></iframe>