Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates - a script inside a template inside a patch should not execute</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<section id="placeholder">
<script>
window.state = "init";
</script>
</section>
<template patchfor="placeholder"><template><script>window.state = 'patched';</script></template></template>
<script>
test(() => {
assert_not_equals(document.querySelector("#placeholder").firstElementChild, null);
assert_equals(window.state, "init");
});
</script>