LibWeb: Include submitter name and value when constructing FormData

This fixes the SSO buttons on OpenAI's login page giving "Unknown
error"
This commit is contained in:
Luke Wilde 2025-07-15 15:48:55 +01:00 committed by Jelle Raaijmakers
commit d9cb8185cc
Notes: github-actions[bot] 2025-07-15 18:51:17 +00:00
4 changed files with 23 additions and 7 deletions

View file

@ -43,8 +43,8 @@ WebIDL::ExceptionOr<GC::Ref<FormData>> FormData::construct_impl(JS::Realm& realm
}
}
// 2. Let list be the result of constructing the entry list for form.
auto entry_list = TRY(construct_entry_list(realm, *form));
// 2. Let list be the result of constructing the entry list for form and submitter.
auto entry_list = TRY(construct_entry_list(realm, *form, submitter));
// 3. If list is null, then throw an "InvalidStateError" DOMException.
if (!entry_list.has_value())
return WebIDL::InvalidStateError::create(realm, "Form element does not contain any entries."_string);