Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/interactive-elements/the-details-element/details-add-summary.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<link rel=match href="details-add-summary-ref.html">
<link rel=author href="mailto:jarhar@chromium.org">
<!-- This test makes sure that new <summary> elements get rendered correctly
when added to a <details> element. I ran into it when adding
content-visibility:hidden to the second slot of <details>. -->
<script>
onload = () => {
const newsummary = document.createElement('summary');
newsummary.textContent = 'new summary';
document.getElementById('detailsid').insertBefore(newsummary,
document.getElementById('oldsummary'));
document.documentElement.classList.remove('reftest-wait');
};
</script>
<details id=detailsid>
<summary id=oldsummary>old summary</summary>
details
</details>