-
Notifications
You must be signed in to change notification settings - Fork 135
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
Define concepts for converting and validating .data
#977
Conversation
7a6cfe4
to
c3d0335
Compare
@marcoscaceres - fyi this is my suggestion for adding a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation should be separate from conversion...
cc @ianbjacobs as landing this blocks w3c/secure-payment-confirmation#194 The build is currently failing because the upstream of this PR (#976) is behind HEAD and needs updated to include 34c206f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting this makes a couple of normative changes... in particular, it no longer exclusively throws a TypeError
during the processing steps.
This makes it easier for other specifications to clearly indicate their defined steps to convert and validate the data member.
2b4692a
to
a389afa
Compare
.data
Good catch - thanks for noticing this! I've updated the PR description and title (along with addressing your other comments) to reflect that new errors may be thrown. |
This PR introduces two new definitions (
dfn
) for both the IDL type thatPaymentMethodData/data
should be converted into, and for the validationsteps that a payment method will perform on it. This allows payment method
specs to define these in a way that is cross-linkable to the PaymentRequest
specification.
This change is mostly editorial, except that it allows for arbitrary error types
to be thrown during validation (previously only
TypeError
would be thrown).Preview | Diff