comparison: layout/reftests/scoped-style/scoped-style-dynamic-001.html
layout/reftests/scoped-style/scoped-style-dynamic-001.html
- changeset 2
- 7e26c7da4463
equal
deleted
inserted
replaced
|
1 <!DOCTYPE html> |
|
2 <body onload="f()"> |
|
3 <p>First</p> |
|
4 <p>Second</p> |
|
5 <p>Third</p> |
|
6 <script> |
|
7 function f() { |
|
8 var p = document.getElementsByTagName("p")[1]; |
|
9 var style = document.createElement("style"); |
|
10 style.setAttribute("scoped", ""); |
|
11 style.textContent = "p { color: green }"; |
|
12 p.appendChild(style); |
|
13 } |
|
14 </script> |
|
15 </body> |