gecko-dev/layout/reftests/scoped-style/scoped-style-dynamic-008.html

18 строки
333 B
HTML

<!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>