<!DOCTYPE html> | |
<script src="../../resources/testharness.js"></script> | |
<script src="../../resources/testharnessreport.js"></script> | |
<div id="dialog"> | |
<div id="item"></div> | |
</div> | |
<script> | |
test(() => { | |
const itemRoot = item.attachShadow({mode: 'open'}); | |
const dialogRoot = dialog.attachShadow({mode: 'open'}); | |
dialogRoot.innerHTML = '<dialog><slot></slot></dialog>'; | |
dialog.offsetTop; | |
dialogRoot.firstChild.showModal(); | |
}, "showModal on dialog inside shadow should not crash."); | |
</script> |