LibWeb: Don't crash when parsing HTMLInputElement invalid time values

This commit is contained in:
Tim Ledbetter
2024-08-20 21:56:04 +01:00
committed by Tim Ledbetter
parent b0fc8b67d6
commit fe42e2719f
3 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const inputElement = document.createElement("input");
inputElement.type = "time";
inputElement.value = "invalid";
inputElement.value = "xx:34:56";
inputElement.value = "12:xx:56";
inputElement.value = "12:34:xx";
println("PASS (didn't crash)");
});
</script>