-
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
Add MerchantValidationEvent.prototype.methodName #776
Conversation
1e39f95
to
a07e0cd
Compare
a07e0cd
to
2033962
Compare
empty string, run the steps to <a data-cite= | ||
"payment-method-id#dfn-validate-a-payment-method-identifier">validate | ||
a payment method identifier</a> with | ||
<var>eventInitDict</var>["<a>methodName</a>"]. If it returns false, |
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.
I'm always unsure how much validation we should be doing in event constructors, i.e. should they be dumb property bags that hold whatever you pass in, or should they enforce domain logic constraints. But this is good for now, and consistent.
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.
Yeah, thought about the same. Consistency allows us to treat both implementers and user-land code as potentially invalid, which I think is a good thing.
@aestes, @rsolomakhin, thanks also for the speedy review! Thanks @aestes for already adding the link to Safari! @rsolomakhin, do you have a link too a Chrome bug? |
@marcoscaceres I filed a bug instead of Rouslan. https://crbug.com/883605 |
Wrote some initial MDN docs for MerchantValidationEvent: @aestes, do have development docs folks on the Safari side that can fill out the rest? Otherwise, we can get folks over on the Mozilla/MDN side to do it. However, want to make sure what is there is right, as it's (right now) very Apple Pay specific. |
Ah, @romandev, you are the best. Thanks for filing it! |
closes #775
The following tasks have been completed:
Implementation commitment:
Optional, Impact on Payment Handler spec?
Preview | Diff