tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

sample-on-last-keyframe.html (901B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Sample on last keyframe</title>
      6  <link rel="help" href="https://www.w3.org/TR/css-animations-1/#animation-direction">
      7  <style type="text/css" media="screen">
      8    #test {
      9      animation:  test 1s reverse paused;
     10    }
     11    @keyframes test {
     12      from { opacity: 0; }
     13      to { opacity: 0.5; }
     14    }
     15  </style>
     16 </head>
     17 <script src="/resources/testharness.js"></script>
     18 <script src="/resources/testharnessreport.js"></script>
     19 <script src="/web-animations/testcommon.js"></script>
     20 <body>
     21 <div id="log"></div>
     22 <script>
     23 'use strict';
     24 
     25 promise_test(async t => {
     26  const div = createDiv(t);
     27  div.id = 'test';
     28  const anim = div.getAnimations()[0];
     29  await anim.ready;
     30  const opacity = parseFloat(getComputedStyle(div).opacity);
     31  assert_equals(opacity, 0.5);
     32 }, 'Opacity at start of reverse running animation');
     33 
     34 </script>
     35 </body>
     36 </html>