Closed stephenmcgruer closed 1 year ago
@marcoscaceres - fyi this is my suggestion for adding a dfn
for https://github.com/w3c/payment-request/pull/976, to make it easier for other specifications to define their behaviour for it.
cc @ianbjacobs as landing this blocks https://github.com/w3c/secure-payment-confirmation/issues/194
The build is currently failing because the upstream of this PR (https://github.com/w3c/payment-request/pull/976) is behind HEAD and needs updated to include https://github.com/w3c/payment-request/commit/34c206fdb8f88728ba1e9198d6bceb08860ed29f
Noting this makes a couple of normative changes... in particular, it no longer exclusively throws a TypeError during the processing steps.
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 validation steps 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