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

      var i = document.createElement('input');
      i.autofocus = false;
      body.appendChild(i);

      i = document.createElement('input');
      i.autofocus = true;
      i.onfocus = function() { setTimeout(document.documentElement.removeAttribute('class'), 0); };
      body.appendChild(i);

      i = document.createElement('input');
      i.autofocus = true;
      i.onfocus = function() { setTimeout(document.documentElement.removeAttribute('class'), 0); };
      body.appendChild(i);
    </script>
  </body>
</html>