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-reverse.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates: patch should appear after its target</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<template for="p">New content</template>
<div id="placeholder"><?start name="p">Old content<?end></div>
<script>
test(() => {
assert_equals(document.querySelector("#placeholder").innerText, "Old content");
assert_not_equals(document.querySelector("template[for=p]"), null, "Template should attach");
});
</script>