ladybird/Tests/LibWeb/Text/input/input-value.html
2025-03-20 11:50:49 +01:00

27 lines
698 B
HTML

<!DOCTYPE html>
<input id="text" type="text" />
<input id="hidden" type="hidden" />
<input id="button" type="button" />
<input id="checkbox" type="checkbox" />
<input id="file" type="file" />
<script src="include.js"></script>
<script>
const testInput = (id) => {
let input = document.getElementById(id);
try {
input.value = "pass";
println(`${id}: "${input.value}"`);
} catch (e) {
println(`${id}: "${input.value}" (threw exception)`);
}
};
test(() => {
testInput("text");
testInput("hidden");
testInput("button");
testInput("checkbox");
testInput("file");
});
</script>