summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/shadow/content-pseudo-element.html
blob: 2d4d5eb44d7755ec3457ffb9c992de0d1be49c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
<head>
<script src="resources/shadow-dom.js"></script>
</head>
<body>
<div id="sandbox"></div>
<script>
var shadowStyle = document.createElement('style');
shadowStyle.innerHTML = 'content::content div { color: green; }';

var sandbox = document.getElementById('sandbox');
sandbox.appendChild(
    createDOM('div', {},
              createShadowRoot(
                  shadowStyle,
                  createDOM('content')),
              createDOM('div', {},
                        document.createTextNode('green'))));
</script>
</body>
</html>