blob: a2d1938bbf31cab9f005b7316000cd3ae755e4ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div id='testElem'></div>
<script>
test(function() {
assert_equals(testElem.getAttribute('style'), null);
testElem.style.setProperty('--foo', 'first');
assert_equals(testElem.style.getPropertyValue('--foo'), 'first');
assert_equals(getComputedStyle(testElem).getPropertyValue('--foo'), 'first');
assert_equals(testElem.getAttribute('style'), '--foo:first;');
testElem.style.setProperty('--foo', 'second');
assert_equals(testElem.style.getPropertyValue('--foo'), 'second');
assert_equals(testElem.getAttribute('style'), '--foo:second;');
}, "subsequent writes to inline style overwrite older values.")
</script>
|