tor-browser

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

canvas-drawImage-origin-clean-1.html (609B)


      1 <html>
      2  <head>
      3    <script type="text/javascript">
      4      function go() {
      5        var canvas = document.getElementById("canvas");
      6        var ctx = canvas.getContext("2d");
      7        var image = document.getElementById("image");
      8 
      9        // Draw the SVG image
     10        ctx.drawImage(image, 0, 0);
     11 
     12        try {
     13          canvas.toDataURL();
     14        } catch (ex) {
     15          document.body.textContent = ex;
     16        }
     17      }
     18    </script>
     19  </head>
     20  <body onload="go()">
     21    <canvas id="canvas" width="200" height="200"></canvas>
     22    <img id="image" src="lime100x100.svg" style="display: none">
     23 </body>
     24 </html>