Files
ladybird/Tests/LibWeb/Text/input/HTML/canvas-stroke-style-gradient.html
Callum Law 27a00f19c5 LibWeb: Update correct value for canvas stroke style setter
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.
2026-04-08 14:31:43 +01:00

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>