summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/backdrop-filter-update.html
blob: 6a81fc63eb5d9bb08101f2125059dd110173b82e (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>backdrop-filter: Update filter value</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<link rel="match"  href="backdrop-filter-update-ref.html">

<p>Expected: A green box</p>
<div id="colorbox"></div>
<div id="filterbox"></div>

<style>
div {
    position: absolute;
    width: 100px;
    height: 100px;
    left: 10px;
    top: 50px;
}
#colorbox {
    background: #ff7fff;
}
#filterbox {
    backdrop-filter: invert(0);
}
</style>

<script>
window.onload = function(e) {
  requestAnimationFrame(() => {
    requestAnimationFrame(() => {
      let filt = document.getElementById("filterbox");
      filt.style.backdropFilter = "invert(1)";
	  document.documentElement.classList.remove('reftest-wait');
    });
  });
}
</script>