mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #25070 - cagandhi:named-form-getter, r=jdm
Named form getter This PR contains changes related to adding named getter in Servo for getting the list of all meaningful property names for a HTMLFormElement object, and getting the value of a specific property name. The following changes have been made: * uncomment the [named getter](f63b404e0c/components/script/dom/webidls/HTMLFormElement.webidl (L30)
) from HTMLFormElement.webidl * add the missing `NamedGetter` and `SupportedPropertyNames` methods to [HTMLFormElement](f63b404e0c/components/script/dom/htmlformelement.rs (L113)
) * implement `SupportedPropertyNames` according to [the specification](https://html.spec.whatwg.org/multipage/forms.html#the-form-element:supported-property-names): * create an enum to represent the `id`, `name`, and `past` states for the sourced names * create a vector of `(SourcedName, DomRoot<HTMLElement>)` by iterating over `self.controls` and checking the element type and calling methods like `HTMLElement::is_listed_element` --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #16479 (GitHub issue number if applicable)
This commit is contained in:
commit
d205194618
8 changed files with 231 additions and 22 deletions
|
@ -29,7 +29,7 @@ interface HTMLFormElement : HTMLElement {
|
|||
[SameObject] readonly attribute HTMLFormControlsCollection elements;
|
||||
readonly attribute unsigned long length;
|
||||
getter Element? (unsigned long index);
|
||||
//getter (RadioNodeList or Element) (DOMString name);
|
||||
getter (RadioNodeList or Element) (DOMString name);
|
||||
|
||||
void submit();
|
||||
[CEReactions]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue