tor-browser

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

animation-with-offsets-crash.html (822B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#scrolltimeline-interface">
      3 <style>
      4 .scroller {
      5  overflow: auto;
      6  height: 100px;
      7  width: 100px;
      8  will-change: transform;
      9 }
     10 
     11 .contents {
     12  height: 1000px;
     13  width: 100%;
     14 }
     15 </style>
     16 <div class="scroller">
     17  <div class="contents"></div>
     18 </div>
     19 <script>
     20  // Test passes if it does not crash.
     21  // Scroll timeline animations are progress-based and not compatible with
     22  // delays specified in milliseconds.
     23  const scroller = document.querySelector('.scroller');
     24  const animation = new Animation();
     25  const timeline = animation.timeline;
     26  const duration = timeline.duration;
     27  const options = {
     28    source: scroller,
     29    scrollOffsets: [new CSSMathInvert(duration)]
     30  };
     31  const scroll_timeline = new ScrollTimeline(options);
     32 </script>