forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Implement the
HTMLOptionElement.form
attribute
This returns the parent form of a HTMLOptionElement or null if the element has no parent form.
- Loading branch information
1 parent
fe7df98
commit 763b7f0
Showing
5 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Option element with no parent select returns null: true | ||
Option element with no parent form returns null: true | ||
Option element with no parent select returns null: true | ||
Option element within optgroup with no parent select returns null: true | ||
<FORM id="form3" > | ||
<FORM id="form4" > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<option id="option-no-select"></option> | ||
<select> | ||
<option id="option-no-form"></option> | ||
</select> | ||
<form id="form1"> | ||
<option id="option-within-form-no-select"></option> | ||
</form> | ||
<form id="form2"> | ||
<optgroup> | ||
<option id="option-within-optgroup-no-select"></option> | ||
</optgroup> | ||
</form> | ||
<form id="form3"> | ||
<select> | ||
<option id="option-within-select"></option> | ||
</select> | ||
</form> | ||
<form id="form4"> | ||
<select> | ||
<optgroup> | ||
<option id="option-within-optgroup"></option> | ||
</optgroup> | ||
</select> | ||
</form> | ||
<script src="../include.js"></script> | ||
<script> | ||
test(() => { | ||
println(`Option element with no parent select returns null: ${document.getElementById("option-no-select").form === null}`); | ||
println(`Option element with no parent form returns null: ${document.getElementById("option-no-form").form === null}`); | ||
println(`Option element with no parent select returns null: ${document.getElementById("option-within-form-no-select").form === null}`); | ||
println(`Option element within optgroup with no parent select returns null: ${document.getElementById("option-within-optgroup-no-select").form === null}`); | ||
printElement(document.getElementById("option-within-select").form); | ||
printElement(document.getElementById("option-within-optgroup").form); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters