blob: 0d71628c2b8ec1da339aaba71187203152be5290 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This test verifies that acquiring the 'style' attribute via a DOM Attr node still works correctly after the inline style has been modified through the CSSOM API.");
var e = document.createElement("span");
e.setAttribute("style", "background-color: white;");
var styleAttr = e.getAttributeNode("style");
shouldBe("styleAttr.value", "'background-color: white;'");
e.style.backgroundColor = 'green';
shouldBe("styleAttr.value", "'background-color: green;'");
e.style.backgroundColor = 'red';
var oldStyleAttr = e.setAttributeNode(document.createAttribute("style"));
shouldBe("oldStyleAttr.value", "'background-color: red;'");
</script>
</body>
</html>
|