Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<body>
<div style="content-visibility: auto">lock</div>
<div id="host"></div>
<div id="target"></div>
<script>
const host = document.getElementById('host');
const shadow = host.attachShadow({mode: 'open'});
const container = document.createElement('div');
shadow.appendChild(container);
const dialog1 = document.createElement('dialog');
container.appendChild(dialog1);
const slot = document.createElement('slot');
container.appendChild(slot);
const dialog2 = document.createElement('dialog');
slot.appendChild(dialog2);
dialog1.showModal();
dialog2.showModal();
document.getElementById('target').appendChild(container);
</script>
</body>
</html>