summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element-dynamic.html
blob: 3485e880690ad3ed9ea28d2af31c60383716ffb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<!-- fieldset with no elements and invalid element is added dynamically -->
<html>
  <head>
    <style>
      fieldset:invalid { display:none }
    </style>
    <script>
      function onLoadHandler()
      {
        document.getElementById("fieldset").appendChild(document.getElementById('i'));
        document.documentElement.className='';
      }
    </script>
  </head>
  <body onload='onLoadHandler();'>
    <input id='i' required>
    <fieldset id="fieldset">
    </fieldset>
  </body>
</html>