Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/dom/partial-updates/tentative/template-for-supersedes-invalid-shadowrootmode.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates: invalid shadowrootmode superseded by for</title>
<link rel=help href="https://github.com/WICG/declarative-partial-updates">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="container">
<section id=outer marker="d"><?start name="d">Unchanged<?end name="d"></section>
<template shadowrootmode="invalid" for="d"><section id=inner>Inside</section></template>
</div>
<script>
test(() => {
const outer = document.querySelector("#outer");
assert_equals(outer.textContent, "Inside");
assert_equals(document.querySelector("#container").shadowRoot, null);
});
</script>