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-patchfor-style-plaintext.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset="utf-8" />
<title>HTML partial updates - patch updates style with plain text</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style id="placeholder"></style>
<div id="dummy"></div>
<template patchfor="placeholder">
#dummy { color: rgba(100, 0, 100); }
#something:after { content: "<div id=dontparseme></div>" };
</template>
<script>
test(() => {
assert_equals(document.querySelector("#placeholder").firstElementChild, null);
assert_equals(getComputedStyle(document.getElementById("dummy")).color, "rgb(100, 0, 100)");
});
</script>