-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update CustomElementConstructor type and exception #23202
Comments
Cool. I think I understand this. I can do it. |
I have found 2 places where we need to change from
The tests are already in Servo here and here, and they are the latest version using TypeError. After changing to I can confirm all the My only question: I'm not sure what if !same {
return Err(Error::Type("Returned element is not SameValue as the upgraded element".to_string())); Is this what's expected? Or is there somewhere specific to get the correct string from? |
Strings are implementation-defined, so that one seems fine. |
Addresses Issue servo#23202
Addresses Issue servo#23202
…r_type, r=cybai,jdm Use TypeError instead of InvalidState for exception. <!-- Please describe your changes on the following line: --> Use TypeError instead of InvalidState as per whatwg/html#4525 for making CustomElementConstructor exceptions more consistent. <!-- 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 #23202 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes: Tests that expected failure now expect passing with correct result. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23530) <!-- Reviewable:end -->
…r_type, r=cybai,jdm Use TypeError instead of InvalidState for exception. <!-- Please describe your changes on the following line: --> Use TypeError instead of InvalidState as per whatwg/html#4525 for making CustomElementConstructor exceptions more consistent. <!-- 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 #23202 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes: Tests that expected failure now expect passing with correct result. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23530) <!-- Reviewable:end -->
…r_type, r=cybai,jdm Use TypeError instead of InvalidState for exception. <!-- Please describe your changes on the following line: --> Use TypeError instead of InvalidState as per whatwg/html#4525 for making CustomElementConstructor exceptions more consistent. <!-- 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 #23202 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes: Tests that expected failure now expect passing with correct result. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23530) <!-- Reviewable:end -->
…r_type, r=cybai,jdm Use TypeError instead of InvalidState for exception. <!-- Please describe your changes on the following line: --> Use TypeError instead of InvalidState as per whatwg/html#4525 for making CustomElementConstructor exceptions more consistent. <!-- 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 #23202 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes: Tests that expected failure now expect passing with correct result. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23530) <!-- Reviewable:end -->
…r_type, r=cybai,jdm Use TypeError instead of InvalidState for exception. <!-- Please describe your changes on the following line: --> Use TypeError instead of InvalidState as per whatwg/html#4525 for making CustomElementConstructor exceptions more consistent. <!-- 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 #23202 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes: Tests that expected failure now expect passing with correct result. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23530) <!-- Reviewable:end -->
…r_type, r=cybai,jdm Use TypeError instead of InvalidState for exception. <!-- Please describe your changes on the following line: --> Use TypeError instead of InvalidState as per whatwg/html#4525 for making CustomElementConstructor exceptions more consistent. <!-- 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 #23202 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes: Tests that expected failure now expect passing with correct result. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23530) <!-- Reviewable:end -->
…r_type, r=cybai,jdm Use TypeError instead of InvalidState for exception. <!-- Please describe your changes on the following line: --> Use TypeError instead of InvalidState as per whatwg/html#4525 for making CustomElementConstructor exceptions more consistent. <!-- 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 #23202 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes: Tests that expected failure now expect passing with correct result. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23530) <!-- Reviewable:end -->
Addresses Issue servo#23202
The IDL for CustomElementConstructor was changed in whatwg/html#4525. We should update that as well as the exception used by this code.
To test these changes, we will need the tests in web-platform-tests/wpt#16328.
The text was updated successfully, but these errors were encountered: