ladybird/Tests/LibWeb/Text/input/canvas/fillStyle-serialization.html

20 lines
490 B
HTML
Raw Normal View History

2025-03-18 19:28:35 +01:00
<!DOCTYPE html>
<script src="../include.js"></script>
<canvas id="c" width=300 height=300></canvas>
<script>
test(() => {
let x = c.getContext("2d");
function go(color) {
x.fillStyle = color;
println("`" + color + "` -> `" + x.fillStyle + "`");
}
go("green");
go("rgba(128, 128, 128, 0.4)");
go("rgba(128, 128, 128, 0)");
go("rgba(128, 128, 128, 1)");
go("rgb(128, 128, 128)");
});
</script>