tor-browser

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

content-visibility-auto-svg-image.html (787B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <link rel=match href="content-visibility-auto-svg-image-ref.html">
      4 <link rel=help href="https://drafts.csswg.org/css-contain/#content-visibility">
      5 <link rel=help href="https://bugzilla.mozilla.org/show_bug.cgi?id=1894546">
      6 <body>
      7 
      8 <script>
      9 const svg = `
     10    <svg xmlns="http://www.w3.org/2000/svg" width="400" height="100">
     11        <foreignObject width="100%" height="100%">
     12          <div xmlns="http://www.w3.org/1999/xhtml" style="content-visibility: auto;">
     13            <p style="font: 50px sans-serif;">Hello World</p>
     14          </div>
     15        </foreignObject>
     16    </svg>`;
     17 
     18 const data = `data:image/svg+xml,${encodeURIComponent(svg)}`;
     19 const svgImage = new Image();
     20 svgImage.src = data;
     21 
     22 document.body.appendChild(svgImage);
     23 </script>
     24 
     25 </body>