mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-12 01:47:00 +02:00
Check that `<select>` element has options available immediately (cherry picked from commit 2bf37cb91444dbdaa8e0ccf965b7c9e84717da12)
15 lines
378 B
HTML
15 lines
378 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<select id="select-test">
|
|
<option>Option 1</option>
|
|
<option>Option 2</option>
|
|
</select>
|
|
<script>
|
|
test(() => {
|
|
const s = document.getElementById("select-test");
|
|
if (s.value === "Option 1" && s.selectedOptions[0].selected) {
|
|
println("PASS (correct value)");
|
|
}
|
|
});
|
|
</script>
|