gecko-dev/testing/web-platform/tests/css/css-content/element-replacement-dynamic.html
Patrick Shaughnessy d22a06981b Bug 1607389 [wpt PR 21062] - Add PutForwards to implemented attributes that lacked it, a=testonly
Automatic update from web-platform-tests
PutForwards cleanup

--

wpt-commits: b637a4b36e1a7aab6eaeb82b1247267e2217bbb2
wpt-pr: 21062
2020-01-27 15:36:02 +00:00

24 lines
783 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>The content CSS attribute can replace an element's contents dynamically</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com" />
<link rel="match" href="element-replacement-ref.html" />
<link rel="help" href="https://drafts.csswg.org/css-content-3/#content-property" />
<meta name="assert" content"This test checks that the CSS content propertly can replace a normal element's contents when changed dynamically" />
<style>
#target {
content: none;
}
#target.replaced {
content: url('resources/rect.svg');
}
</style>
<div id="target">This text should not be visible</div>
<script>
const target = document.getElementById("target");
getComputedStyle(target).width;
target.className = "replaced";
</script>