tor-browser

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

constructor.html (928B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>AnimationPlaybackEvent constructor</title>
      4 <link rel="help"
      5      href="https://drafts.csswg.org/web-animations/#dom-animationplaybackevent-animationplaybackevent">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <div id="log"></div>
      9 <script>
     10 'use strict';
     11 
     12 test(t => {
     13  const evt = new AnimationPlaybackEvent('finish');
     14  assert_equals(evt.type, 'finish');
     15  assert_equals(evt.currentTime, null);
     16  assert_equals(evt.timelineTime, null);
     17 }, 'Event created without an event parameter has null time values');
     18 
     19 test(t => {
     20  const evt =
     21    new AnimationPlaybackEvent('cancel', {
     22      currentTime: -100,
     23      timelineTime: 100,
     24    });
     25  assert_equals(evt.type, 'cancel');
     26  assert_equals(evt.currentTime, -100);
     27  assert_equals(evt.timelineTime, 100);
     28 }, 'Created event reflects times specified in constructor');
     29 
     30 </script>