summaryrefslogtreecommitdiffstats
path: root/dom/html/reftests/autofocus/button-create.html
blob: ae49d162ad1357ef8557e62e5bb26f9cfb85eb1d (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('button');
      i.autofocus = false;
      body.appendChild(i);

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

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