mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 00:27:47 +00:00
LibWeb: Make SVGImageElement part of CanvasImageSource union
This is very janky at the moment but it also more correct. :^)
This commit is contained in:
parent
902586a21d
commit
cd0e4a49b8
Notes:
github-actions[bot]
2024-10-04 18:02:14 +00:00
Author: https://github.com/awesomekling
Commit: cd0e4a49b8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1629
10 changed files with 69 additions and 12 deletions
12
Tests/LibWeb/Text/input/canvas/pattern-from-image.html
Normal file
12
Tests/LibWeb/Text/input/canvas/pattern-from-image.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue