mirror of
https://github.com/servo/servo.git
synced 2025-07-21 22:33:41 +01:00
Update the FormData constructor to allow providing a submitter (#35066)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
parent
f5f5a3f79e
commit
cca600e909
4 changed files with 52 additions and 16 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue