mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
When setting to a non-string value (i.e. a `CanvasGradient` or `CanvasPattern`) we would accidentally update the fill style instead of the stroke style.
15 lines
369 B
HTML
15 lines
369 B
HTML
<!doctype html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const canvas = document.createElement("canvas");
|
|
const ctx = canvas.getContext("2d");
|
|
|
|
const gradient = ctx.createLinearGradient(0, 0, 120, 0);
|
|
|
|
ctx.strokeStyle = gradient;
|
|
|
|
println(ctx.strokeStyle === gradient ? "PASS" : "FAIL");
|
|
});
|
|
</script>
|