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:
- /css/css-values/attr-universal-selector.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Values and Units Test: attr() security limitations in universal selector </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@property --some-string {
syntax: "<string>";
inherits: true;
initial-value: "empty";
}
* {
}
div {
--some-string: attr(data-foo);
background-image: image-set(var(--some-string));
}
</style>
<html>
<body>
</body>
</html>
<script>
var elem = document.getElementById("attr");
test(() => {
assert_equals(window.getComputedStyle(elem).getPropertyValue('background-image'),
'none',
});
</script>