Update the FormData constructor to allow providing a submitter (#35066)

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2025-01-24 04:20:44 +11:00 committed by GitHub
parent f5f5a3f79e
commit cca600e909
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 52 additions and 16 deletions

View file

@ -1475,7 +1475,7 @@ impl FormSubmitterElement<'_> {
}
// https://html.spec.whatwg.org/multipage/#concept-submit-button
fn is_submit_button(&self) -> bool {
pub(crate) fn is_submit_button(&self) -> bool {
match *self {
// https://html.spec.whatwg.org/multipage/#image-button-state-(type=image)
// https://html.spec.whatwg.org/multipage/#submit-button-state-(type=submit)
@ -1487,7 +1487,7 @@ impl FormSubmitterElement<'_> {
}
// https://html.spec.whatwg.org/multipage/#form-owner
fn form_owner(&self) -> Option<DomRoot<HTMLFormElement>> {
pub(crate) fn form_owner(&self) -> Option<DomRoot<HTMLFormElement>> {
match *self {
FormSubmitterElement::Button(button_el) => button_el.form_owner(),
FormSubmitterElement::Input(input_el) => input_el.form_owner(),