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-contentmethod-only-html-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates: template with contentmethod does not work in XHTML</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
promise_test(async () => {
const iframe = document.createElement("iframe");
iframe.src = "resources/contentmethod.xhtml";
document.body.append(iframe);
await new Promise(resolve => iframe.addEventListener("load", resolve));
const {contentDocument} = iframe;
assert_not_equals(contentDocument.querySelector("#patch"), null);
assert_equals(contentDocument.querySelector("#placeholder").textContent, "Unchanged");
});
</script>