Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-values/attr-dynamic-marker-content.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<link rel="match" href="attr-style-sharing-5-ref.html">
<style>
li::marker {
content: attr(icon, "* ");
}
</style>
<ul>
<li id="bullet" icon="$ ">Has icon attribute</li>
<li>Fallback icon</li>
</ul>
<script>
onload = () => {
bullet.getBoundingClientRect();
bullet.setAttribute("icon", "@ ");
};
</script>