mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
LibWeb: Mirror options collection on the select element
This commit is contained in:
parent
e4fb4d7c1a
commit
3e296a1b92
Notes:
github-actions[bot]
2026-01-06 12:05:11 +00:00
Author: https://github.com/lpas
Commit: 3e296a1b92
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6749
Reviewed-by: https://github.com/Psychpsyo
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/konradekk
Reviewed-by: https://github.com/shannonbooth
5 changed files with 37 additions and 13 deletions
|
|
@ -104,7 +104,8 @@ WebIDL::ExceptionOr<void> HTMLOptionsCollection::set_value_of_indexed_property(u
|
|||
|
||||
// 4. If n is greater than zero, then append a DocumentFragment consisting of n-1 new option elements with no attributes and no child nodes to the select element on which the HTMLOptionsCollection is rooted.
|
||||
if (n > 0) {
|
||||
for (WebIDL::UnsignedLong i = 0; i < n - 1; i++) {
|
||||
// AD-HOC: https://github.com/whatwg/html/issues/11905
|
||||
for (WebIDL::UnsignedLong i = 0; i < n; i++) {
|
||||
TRY(root_element->append_child(TRY(DOM::create_element(root_element->document(), HTML::TagNames::option, Namespace::HTML))));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue