1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/scoped-style/scoped-style-dynamic-001.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +<!DOCTYPE html> 1.5 +<body onload="f()"> 1.6 + <p>First</p> 1.7 + <p>Second</p> 1.8 + <p>Third</p> 1.9 + <script> 1.10 + function f() { 1.11 + var p = document.getElementsByTagName("p")[1]; 1.12 + var style = document.createElement("style"); 1.13 + style.setAttribute("scoped", ""); 1.14 + style.textContent = "p { color: green }"; 1.15 + p.appendChild(style); 1.16 + } 1.17 + </script> 1.18 +</body>