LibWeb: Make SVGImageElement part of CanvasImageSource union

This is very janky at the moment but it also more correct. :^)
This commit is contained in:
Andreas Kling 2024-10-04 14:39:04 +02:00 committed by Andreas Kling
commit cd0e4a49b8
Notes: github-actions[bot] 2024-10-04 18:02:14 +00:00
10 changed files with 69 additions and 12 deletions

View file

@ -0,0 +1,12 @@
<script src="../include.js"></script>
<script>
test(() => {
let canvas = document.createElement("canvas");
let ctx = canvas.getContext("2d");
let img = document.createElement("img");
println(ctx.createPattern(img, 'repeat'));
img = document.createElementNS("http://www.w3.org/2000/svg", "image");
println(ctx.createPattern(img, 'repeat'));
println("PASS (didn't throw!)");
});
</script>