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