Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE HTML>
<head marker="cn">
<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>
<?start name="cn"?>
</head>
<body>
<div id="target"></div>
<template for="cn">
<style id="placeholder">
#target { color: rgba(100, 0, 100); }
#something:after { content: "<div id=dontparseme></div>" };
</style>
</template>
<script>
test(() => {
assert_equals(document.querySelector("#placeholder").firstElementChild, null);
assert_equals(getComputedStyle(document.getElementById("target")).color, "rgb(100, 0, 100)");
});
</script>