tor-browser

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

background-image-multiple.https.html (887B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <link rel="help" href="https://drafts.css-houdini.org/css-paint-api/">
      4 <link rel="match" href="background-image-multiple-ref.html">
      5 <style>
      6    #output {
      7        width: 100px;
      8        height: 100px;
      9        background-image: paint(n0), paint(n1), paint(n2);
     10    }
     11 </style>
     12 <script src="/common/reftest-wait.js"></script>
     13 <script src="/common/worklet-reftest.js"></script>
     14 <body>
     15 <div id="output"></div>
     16 
     17 <script id="code" type="text/worklet">
     18 var colors = ['red', 'green', 'blue'];
     19 
     20 for (let i = 0; i < 3; i++) {
     21    registerPaint('n' + i, class {
     22        paint(ctx, geom) {
     23            ctx.fillStyle = colors[i];
     24            ctx.fillRect(i * 20, i * 20, 40, 40);
     25        }
     26    });
     27 }
     28 </script>
     29 
     30 <script>
     31    importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
     32 </script>
     33 </body>
     34 </html>