summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/cssom/cssstyledeclaration-mutationrecord-001.html
blob: ba4d926b15ce3abd4100fda575cad1797db19cb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!doctype html>
<meta charset="utf-8">
<title>CSSOM: CSSStyleDeclaration.setPropertyValue queues a mutation record when changed</title>
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setpropertyvalue">
<link rel="help" href="https://drafts.csswg.org/cssom/#update-style-attribute-for">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
  document.documentElement.style.top = "0px";

  let test = async_test("CSSStyleDeclaration.setPropertyValue queues a mutation record when serialization is changed");
  let m = new MutationObserver(function(r) {
    assert_equals(r.length, 1);
    test.done();
  });

  m.observe(document.documentElement,  { attributes: true });
  document.documentElement.style.top = "1px";
</script>