wpt / css / cssom / style-attr-clone.html

Status: FAIL | Duration: 9ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/cssom/style-attr-clone.html

<!doctype html>
<title>Style mutations on cloned element don't affect the original element</title>
<link rel="help" href="https://drafts.csswg.org/cssom/">
<link rel="match" href="style-attr-clone-ref.html">
<div id=wrapper style="display: none">
  <div id="target" style="color: red">What color am I</div>
</div>
<script>
  target.style.color = "green";
  let clone = target.cloneNode(true);
  clone.style.color = "blue";
  wrapper.appendChild(clone);
  wrapper.style.display = "";
</script>

/css/cssom/style-attr-clone-ref.html

<!doctype html>
<div style="color: green">What color am I</div>
<div style="color: blue">What color am I</div>