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-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Values and Units Test: attr</title>
<meta name="assert" content="Test attr use after free crash">
<head>
<style>
#div {
--prop: attr(data-foo type(<ident>));
}
</style>
</head>
<body>
<div id="div" data-foo="aaa123\aaa123aaa">Content</div>
</body>
<script>
var elem = document.getElementById("div");
getComputedStyle(elem).getPropertyValue("--prop");
</script>