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

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

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