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-contentmethod-supersedes-invalid-shadowrootmode.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates: invalid shadowrootmode superseded by contentmethod</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="container">
<section id=outer contentname="d">Unchanged</section>
<template shadowrootmode="invalid" contentmethod="replace-children">
<section id=inner contentname="d">Inside</section>
</template>
</div>
<script>
test(() => {
const outer = document.querySelector("#outer");
assert_equals(outer.textContent, "Inside");
assert_equals(document.querySelector("#container").shadowRoot, null);
});
</script>