Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement "get element target" and "get element noopener" algorithms #27253
Comments
|
@highfive I'll take this one. |
|
A question about unpacking: how do I unwrap a Document from DomRoot? I'm pretty sure it's not unwrap(), but I couldn't find a suitable function in root.rs. This unwrap would be useful for step 2 of getting an element's target. |
|
|
|
Great, thanks! |
|
Another question, how do I gain access to a specific button wrapped in the enum FormSubmitter? I'm trying to check whether or not the submit button has a formtarget attribute value. |
|
@avr1254 It's an enum:
You can match on it (or use |
Implemented get element target algorithm Added check for area and anchor element Finished issue: Implemented get target and no opener algorithm Implemented get element target and get element noopener algorithms. <!-- Please describe your changes on the following line: --> Used the algorithms in html spec to implement target and no opener algorithms. --- <!-- 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 #27253 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Implemented get element target algorithm Added check for area and anchor element Finished issue: Implemented get target and no opener algorithm Implemented get element target and get element noopener algorithms. <!-- Please describe your changes on the following line: --> Used the algorithms in html spec to implement target and no opener algorithms. --- <!-- 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 #27253 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Implemented get element target algorithm Added check for area and anchor element Finished issue: Implemented get target and no opener algorithm Implemented get element target and get element noopener algorithms. <!-- Please describe your changes on the following line: --> Used the algorithms in html spec to implement target and no opener algorithms. --- <!-- 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 #27253 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Implemented get element target algorithm Added check for area and anchor element Finished issue: Implemented get target and no opener algorithm Implemented get element target and get element noopener algorithms. <!-- Please describe your changes on the following line: --> Used the algorithms in html spec to implement target and no opener algorithms. --- <!-- 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 #27253 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Implemented get element target algorithm Added check for area and anchor element Finished issue: Implemented get target and no opener algorithm Implemented get element target and get element noopener algorithms. <!-- Please describe your changes on the following line: --> Used the algorithms in html spec to implement target and no opener algorithms. --- <!-- 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 #27253 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Spec:
We'll want to replace the places in the code that do these in an ad-hoc fashion, like this and this and ensure we're following the relevant spec steps in https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm:get-an-element's-noopener and https://html.spec.whatwg.org/multipage/links.html#following-hyperlinks:get-an-element's-target.