focus-change-test-subframe.html (411B)
1 <!doctype html> 2 3 <script> 4 function handleFocus() { 5 window.parent.postMessage({status: "focus"}, '*'); 6 } 7 8 async function handleBlur() { 9 let didRun = false; 10 scheduler.postTask(() => { didRun = true; }); 11 await scheduler.yield(); 12 window.parent.postMessage({status: "done", didRun}, '*'); 13 } 14 </script> 15 16 <input placeholder='focus me' id=input onfocus="handleFocus()" onblur="handleBlur()">