Closed marcoscaceres closed 6 years ago
Blocking on @aestes review/feedback. This is primarily to align with Apple Pay so really need someone from Apple to approve it.
Gecko tracking bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1474499
WebKit implementation: https://trac.webkit.org/changeset/226766
Added tests for constructor and for onmerchantvalidation attribute: https://github.com/web-platform-tests/wpt/pull/12424 and https://github.com/web-platform-tests/wpt/pull/12423
@aestes, wrote:
This looks good, although I was surprised to see that MerchantValidationEvent.validationURL can be initialized from the eventInitDict. Is that there for payment handlers' sake?
It's not handler related - but could be used there too, I guess: It used to be a requirement in the DOM Spec that there be a 1:1 relationship between initialization dictionary members and Event interface attributes.
@domenic, I see this has now changed in the inner event creation steps. It seems that requirement was loosened up a bit:
For each member → value in dictionary, if event has an attribute whose identifier is member, then initialize that attribute to value.
Or does the 1:1 relationship rule still hold?
@aestes, the .complete()
still rely on .isTrusted
- so IMO it would still be good to define how URLs are resolved when the MerchantValidationEvent is constructed (even if constructed unsafely in JS).
@domenic requesting prioritization on this when you have time, as currently I'm working on an implementation in Gecko - so would really appreciate your review.
The idea is still to have 1:1, but there are a few legacy exceptions we worked to accomodate with that clause.
Will do a full review tomorrow!
@domenic, hopefully better now :/
Third time lucky 🤞
closes #646
The following tasks have been completed:
Implementation commitment:
Impact on Payment Handler spec?
Preview | Diff