Skip to content
This repository has been archived by the owner on Mar 19, 2018. It is now read-only.

Change the PaymentRequestUpdateEvent model to better match FetchEvent #50

Closed
wants to merge 2 commits into from

Conversation

adrianba
Copy link
Contributor

Previously there was a bug in the event model where if a page didn't listen for the update event and call updatePaymentRequest then the user interface would be permanently disabled. This change modifies the model to mirror the way that the FetchEvent works in a ServiceWorker. If a page wishes to carry out an update then it calls updateWith and provides a promise that will settle when the page is ready to proceed. If it is resolved with a PaymentDetails dictionary then the payment request will be updated with the supplied information. If it is rejected then no update occurs and the request can continue. If the page does not listen for the event or does not call updateWith then the request can continue.

You can read this change in place in the spec here.

Previously there was a bug in the event model where if a page didn't
listen for the update event and call updatePaymentRequest then the user
interface would be permanently disabled. This change modifies the model
to mirror the way that the FetchEvent works in a ServiceWorker. If a
page wishes to carry out an update then it calls updateWith and provides
a promise that will settle when the page is ready to proceed. If it is
resolved with a PaymentDetails dictionary then the payment request will
be updated with the supplied information. If it is rejected then no
update occurs and the request can continue. If the page does not listen
for the event or does not call updateWith then the request can continue.
this value to the <code>items</code> field of <em>target</em>@[[\details]].
</li>
<li>
If <code>details</code>contains a <code>shippingOptions</code> value, then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space after "details"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9d4ca3f

@jakearchibald
Copy link

Looks great!

@adrianba
Copy link
Contributor Author

@jakearchibald, thanks for the review.

@adrianba
Copy link
Contributor Author

Merged as b163172

@adrianba adrianba closed this Feb 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants