tor-browser

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

canvas.2d.offscreen.transferred.direction.inherit.html (1047B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3  <meta charset="utf-8">
      4  <title>HTML5 Canvas Test:  Direction inherit in a transferred offscreen</title>
      5  <link rel="match" href="canvas.2d.offscreen.direction-ref.html" />
      6  <link rel="author" href="mailto:schenney@chromium.org"/>
      7  <link rel="help" href="https://html.spec.whatwg.org/multipage/canvas.html#text-styles"/>
      8  <meta name="assert" content="An offscreen transferred from that canvas inherits the canvas direction."/>
      9  <script src="/common/reftest-wait.js"></script>
     10  <script type="text/javascript">
     11    function runTest() {
     12      var canvas = document.getElementById("canvas1");
     13      var ctx = canvas.transferControlToOffscreen().getContext("2d");
     14 
     15      ctx.font = "25px serif";
     16      ctx.fillText("ABC!", 60, 50);
     17 
     18      requestAnimationFrame(() => requestAnimationFrame(() => takeScreenshot()));
     19    }
     20  </script>
     21  <body onload="runTest()">
     22    <canvas dir="rtl" id="canvas1" width="300" height="150">
     23      Browser does not support HTML5 Canvas.
     24    </canvas>
     25  </body>
     26 </html>