Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-contain/content-visibility/content-visibility-auto-svg-image.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset=utf-8>
<link rel=match href="content-visibility-auto-svg-image-ref.html">
<body>
<script>
const svg = `
<foreignObject width="100%" height="100%">
<p style="font: 50px sans-serif;">Hello World</p>
</div>
</foreignObject>
</svg>`;
const data = `data:image/svg+xml,${encodeURIComponent(svg)}`;
const svgImage = new Image();
svgImage.src = data;
document.body.appendChild(svgImage);
</script>
</body>