Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head><meta charset="utf-8"></head>
<body>
<script>
let hostA = document.createElement('div');
document.body.appendChild(hostA);
let srA = hostA.attachShadow({mode: 'open', slotAssignment: 'manual'});
let slotA = document.createElement('slot');
srA.appendChild(slotA);
let hostB = document.createElement('div');
document.body.appendChild(hostB);
let srB = hostB.attachShadow({mode: 'open', slotAssignment: 'manual'});
let slotB = document.createElement('slot');
srB.appendChild(slotB);
let node = document.createElement('span');
node.textContent = 'test';
hostA.appendChild(node);
slotA.assign(node);
slotB.assign(node);
</script>
</body>
</html>