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-append-text-and-element.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates - declarative append</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="placeholder" contentname="placeholder">Some</div>
<template contentmethod="append"><div contentname="placeholder"> <span>content</span></div></template>
<script>
test(() => {
const placeholder = document.getElementById("placeholder");
assert_equals(placeholder.textContent, "Some content");
assert_equals(placeholder.firstChild.textContent, "Some ");
assert_equals(placeholder.firstChild.nextSibling.tagName, "SPAN");
}, "<template contentmethod=append> with text");
</script>