summaryrefslogtreecommitdiffstats
path: root/dom/html/reftests/autofocus/autofocus-after-load.html
blob: 753ef183d14aa75a6d602a6c0e7ff79507df17d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html class="reftest-wait">
  <link rel='stylesheet' type='text/css' href='style.css'>
  <script>
    function loadHandler()
    {
      var body = document.body;

      var elements = ["input", "textarea", "select", "button"];
      for (var e of elements) {
        var el = document.createElement(e);
        el.autofocus = true;
        body.appendChild(el);
      }

      setTimeout(document.documentElement.removeAttribute('class'), 0);
    }
  </script>
  <body onload="loadHandler();">
  </body>
</html>