summaryrefslogtreecommitdiffstats
path: root/layout/reftests/scoped-style/scoped-style-dynamic-011.html
blob: e5223e19db75426ef3ff83acb90e963645f9dbf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<body onload="f()">
  <p>
    <style scoped>
      p { color: green }
    </style>
    First
  </p>
  <p>Second</p>
  <script>
    function f() {
      var style = document.getElementsByTagName("style")[0];
      var p = document.getElementsByTagName("p")[1];
      p.appendChild(style);
    }
  </script>
</body>