mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 18:52:56 +00:00
LibWeb: Use correct IDL for HTTPFormElement's method attribute
Removed the custom getter and updated the idl so that the attribute is Reflected and Enumerated.
This commit is contained in:
parent
ebe89a3207
commit
6892482755
Notes:
github-actions[bot]
2024-10-21 21:42:12 +00:00
Author: https://github.com/samu698
Commit: 6892482755
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1884
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/BodilessSleeper
Reviewed-by: https://github.com/stelar7
Reviewed-by: https://github.com/tcl3
5 changed files with 83 additions and 19 deletions
|
@ -565,23 +565,6 @@ Vector<JS::NonnullGCPtr<DOM::Element>> HTMLFormElement::get_submittable_elements
|
|||
return submittable_elements;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-fs-method
|
||||
StringView HTMLFormElement::method() const
|
||||
{
|
||||
// The method and enctype IDL attributes must reflect the respective content attributes of the same name, limited to only known values.
|
||||
// FIXME: This should probably be `Reflect` in the IDL.
|
||||
auto method_state = method_state_from_form_element(*this);
|
||||
switch (method_state) {
|
||||
case MethodAttributeState::GET:
|
||||
return "get"sv;
|
||||
case MethodAttributeState::POST:
|
||||
return "post"sv;
|
||||
case MethodAttributeState::Dialog:
|
||||
return "dialog"sv;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#dom-form-rellist
|
||||
JS::NonnullGCPtr<DOM::DOMTokenList> HTMLFormElement::rel_list()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue