summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/cssom/css-style-attribute-modifications.html
blob: 524a5adca3c6127038e3f01aa474726d417c0fcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecobos@igalia.com">
<link rel="help" href="https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="test" style="color: red"></div>
<script>
test(function() {
  var el = document.getElementById("test");
  el.style.color = "";
  assert_true(el.hasAttribute("style"));

  el.removeAttribute("style");
  assert_false(el.hasAttribute("style"));
}, "Mutating the style declaration doesn't remove the style attribute");
</script>