LibWeb: Implement the HTMLLabelElement.form attribute

This returns the form element associated with the given label element's
control or null if the label has no control.
This commit is contained in:
Tim Ledbetter 2024-05-17 06:05:39 +01:00 committed by Andreas Kling
commit 6bf22075ed
Notes: sideshowbarker 2024-07-17 00:49:59 +09:00
5 changed files with 60 additions and 1 deletions

View file

@ -0,0 +1,12 @@
Form for #label-no-for is null
Control for #label-no-for is null: true
Form for #parent-of-input2: #form2
label.form is the same as label.control.form for #parent-of-input2: true
Form for #label-for-input2: #form2
label.form is the same as label.control.form for #label-for-input2: true
Form for #label-for-input1: #form1
label.form is the same as label.control.form for #label-for-input1: true
Form for #label-for-non-labelable-element is null
Control for #label-for-non-labelable-element is null: true
Form for #label-for-nonexistent-element is null
Control for #label-for-nonexistent-element is null: true