20 lines
757 B
HTML
20 lines
757 B
HTML
<!doctype html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Scoping: Dynamic reassignment of a named slot child.</title>
|
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
|
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1927714">
|
|
<link rel="match" href="shadow-reassign-dynamic-006-ref.html">
|
|
<div id="host">
|
|
<template shadowrootmode="open">
|
|
<slot></slot>
|
|
<slot></slot>
|
|
</template>
|
|
<div id="child1">Child1</div>
|
|
<div id="child2" slot="named-slot">Child2</div>
|
|
</div>
|
|
<script>
|
|
host.getBoundingClientRect();
|
|
host.shadowRoot.querySelectorAll("slot")[1].name = "named-slot";
|
|
host.getBoundingClientRect();
|
|
</script>
|