1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 15:04:59 +00:00
serenity/Tests/LibWeb/Text/input/canvas/basic.html
Andreas Kling f34cc0b8e3 LibWeb: Null check fonts after parsing them in CRC2D.font assignment
Fixes an issue where setting CRC2D.font to an unparseable value would
assert due to a null dereference.
2023-08-17 10:07:38 +02:00

11 lines
357 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
let canvas = document.createElement("canvas");
let context = canvas.getContext("2d");
context.font = '20px SerenitySans';
println(context.font);
context.font = '!!!'; // Invalid value, should be ignored.
println(context.font);
});
</script>