Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Shadow DOM Test - Tests a reprojection.</title>
<link rel="match" href="reprojection-001-ref.html">
<link rel="author" title="Anna Ogawa" href="mailto:anna.ogawa.0219@gmail.com">
<link rel="author" title="Hayato Ito" href="mailto:hayato@google.com">
<meta name="assert" content="a node is distributed into more than one insertion point.">
<script src="../../../../html/resources/common.js"></script>
<style>
.pass { color: green; }
</style>
</head>
<body>
<p>You should see green text saying "Apple" and "Orange" below.</p>
<div id="host">
<div class="pass">Apple.</div>
<div class="pass">Orange.</div>
</div>
<script>
var shadowRoot = host.attachShadow({mode: 'open'});
shadowRoot.innerHTML = '<div id="host2">Hello a Shadow Root.<slot></slot><div>Banana.</div></div>';
var host2 = shadowRoot.getElementById("host2");
var shadowRoot2 = host2.attachShadow({mode: 'open'});
shadowRoot2.innerHTML = '<div>Hello a Shadow Root2.</div><div><slot></slot></div>';
</script>
</body>
</html>