autofocus-after-load.html (529B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <link rel='stylesheet' type='text/css' href='style.css'> 4 <script> 5 function loadHandler() 6 { 7 var body = document.body; 8 9 var elements = ["input", "textarea", "select", "button"]; 10 for (var e of elements) { 11 var el = document.createElement(e); 12 el.autofocus = true; 13 body.appendChild(el); 14 } 15 16 setTimeout(document.documentElement.removeAttribute('class'), 0); 17 } 18 </script> 19 <body onload="loadHandler();"> 20 </body> 21 </html>