Files
serenity/Tests/LibWeb/Text/input/canvas/pattern-from-image.html
Andreas Kling abf9980ea1 LibWeb: Make SVGImageElement part of CanvasImageSource union
This is very janky at the moment but it also more correct. :^)

(cherry picked from commit cd0e4a49b8a758aca847ceaf57eec0a62cd7b687;
amended to add a missing include of LibGfx/ImmutableBitmap.h to
SVGImageElement.h that ladybird seems to get transitively somehow)
2024-11-17 16:48:43 -05:00

13 lines
451 B
HTML

<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>