26 lines
786 B
HTML
26 lines
786 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<p>This tests inserting a slot child under a shadow host.<br>
|
|
WebKit should not hit any assertion or crash and you should see 1, 2, & PASS below each on its own line.</p>
|
|
<div id="outerHost"><div slot="slot1">1</div><div slot="slot2">2</div></div>
|
|
<script>
|
|
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
const outerShadow = outerHost.attachShadow({mode: 'open'});
|
|
outerShadow.innerHTML = `<slot name="slot1"></slot><div id="innerHost">X</div>`;
|
|
|
|
const innerHost = outerShadow.getElementById('innerHost');
|
|
innerHost.attachShadow({mode: 'closed'}).innerHTML = '<slot></slot>';
|
|
|
|
innerHost.getBoundingClientRect();
|
|
innerHost.innerHTML = '<slot name="slot2"></slot>';
|
|
|
|
document.write('<div>PASS - WebKit did not crash</div>');
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|