summaryrefslogtreecommitdiffstats
path: root/layout/reftests/webcomponents/shadow-style-2.html
blob: 892a09489d33bac7dc8098a7dc22320c36366824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<body>
<style>
body { color: red; }
</style>
<script>
var div = document.createElement("div");
var shadow = div.attachShadow({ mode: "open" });
shadow.innerHTML = '<p>This should be green.</p>';
document.body.appendChild(div);
shadow.firstChild.offsetTop;
var style = document.createElement("style");
style.textContent = 'p { color: green; }';
shadow.appendChild(style);
</script>