Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-shadow/slotted-text-with-flex.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Test dynamic updates with text slotted into flexbox</title>
<link rel="match" href="slotted-text-with-flex-ref.html">
<div id="test">
<template shadowrootmode=open>
<style>
.content {
border: 2px solid blue;
display: flex;
}
</style>
<div class="content">
<slot></slot>
<div id="toggle">This too.</div>
</div>
</template>
This should be visible.
</div>
<script>
document.body.offsetLeft;
const toggle = test.shadowRoot.querySelector("#toggle");
toggle.style.display = "none";
document.body.offsetLeft;
toggle.style.display = "block";
</script>