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.
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.
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