blob: 23d0cdd30a2e43fe842bd819bb0cdce3d11875de [file] [log] [blame]
<!DOCTYPE html>
Distributed under both the W3C Test Suite License [1] and the W3C
3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
policies and contribution forms [3].
<meta charset="utf-8">
<title>Shadow DOM Test: Basic distribution</title>
<link rel="match" href="shadow-root-002-ref.html">
<link rel="author" title="Anna Ogawa" href="">
<link rel="author" title="Yuta Kitamura" href="">
<link rel="help" href="">
<meta name="assert" content="On distribution, content element is replaced with the shadow host's children.">
<script src="../testcommon.js"></script>
p { color: black; }
.pass { color: green; }
* { color: red; }
You should see four lines of green text "A", "B", "C" and "D" below,
in this order.
<div id="host">
<div class="pass">B</div>
<div class="pass">C</div>
var shadowRoot =;
shadowRoot.innerHTML =
'<style>\n' +
'.shadow-pass { color: green; }\n' +
'* { color: red; }\n' +
'</style>' +
'<div class="shadow-pass">A</div>\n' +
'<content>FAIL</content>' +
'<div class="shadow-pass">D</div>';