Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/dom/partial-updates/tentative/template-for-scripting-nested.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates - a script inside a template inside a patch should not execute</title>
<link rel=help href="https://github.com/WICG/declarative-partial-updates">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<section id="placeholder" marker="c"><?start name="c">
<script>
window.state = "init";
</script><?end name="c">
</section>
<template for="c"><template><script>window.state = 'patched';</script></template></template>
<script>
test(() => {
assert_not_equals(document.querySelector("#placeholder").firstElementChild, null);
assert_equals(window.state, "init");
});
</script>