template-contentmethod-scripting-nested.html (747B)
1 <!DOCTYPE HTML> 2 <meta charset="utf-8" /> 3 <title>HTML partial updates - a script inside a template inside a patch should not execute</title> 4 <link rel=help href="https://github.com/WICG/declarative-partial-updates"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 8 <section id="placeholder" contentname="c"> 9 <script> 10 window.state = "init"; 11 </script> 12 </section> 13 <template contentmethod="replace-children"><section contentname="c"><template><script>window.state = 'patched';</script></section></template></template> 14 <script> 15 test(() => { 16 assert_not_equals(document.querySelector("#placeholder").firstElementChild, null); 17 assert_equals(window.state, "init"); 18 }); 19 20 </script>