Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement HTMLFormElement Element getter #11405

Closed
cbrewster opened this issue May 25, 2016 · 7 comments · Fixed by #11697
Closed

Implement HTMLFormElement Element getter #11405

cbrewster opened this issue May 25, 2016 · 7 comments · Fixed by #11697
Labels
A-content/dom Interacting with the DOM from web content A-forms C-assigned There is someone working on resolving the issue E-less-complex Straightforward. Recommended for a new contributor.

Comments

@cbrewster
Copy link
Contributor

This is just a getter that returns the form element at the given index. HTMLFormControlsCollection.IndexedGetter should be used.


Spec: https://html.spec.whatwg.org/multipage/forms.html#dom-form-item
Code: components/script/dom/webidl/HTMLFormElement.webidl components/script/dom/htmlformelement.rs components/script/dom/htmlformcontrolscollection.rs

@cbrewster cbrewster added A-content/dom Interacting with the DOM from web content E-less-complex Straightforward. Recommended for a new contributor. A-forms labels May 25, 2016
@jdm
Copy link
Member

jdm commented May 25, 2016

Interestingly, there are tests for the named getter (ie. form.someElement), but I don't see any for the indexed getter (ie. form[3]) in tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/. We should write one when implementing this feature.

@mrmiywj
Copy link
Contributor

mrmiywj commented May 25, 2016

I'll pick this up.

@jdm
Copy link
Member

jdm commented May 25, 2016

Same as other issues; we'll leave this one available for others so you can focus on one or two at a time.

@catchmrbharath
Copy link
Contributor

I will work on this.

@jdm
Copy link
Member

jdm commented May 27, 2016

Go ahead!

@jdm jdm added the C-assigned There is someone working on resolving the issue label May 27, 2016
@frewsxcv
Copy link
Contributor

@catchmrbharath Have you already started on this? It looks like @mrmiywj accidentally worked on this in #11697.

@catchmrbharath
Copy link
Contributor

Thats ok. I had some basic code, but I was stuck on something.

bors-servo pushed a commit that referenced this issue Jun 14, 2016
indexed getter of form elements

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11405 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11697)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jun 14, 2016
indexed getter of form elements

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11405 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11697)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jun 14, 2016
indexed getter of form elements

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11405 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11697)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Jun 15, 2016
indexed getter of form elements

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11405 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11697)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content A-forms C-assigned There is someone working on resolving the issue E-less-complex Straightforward. Recommended for a new contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants