Skip to content
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

waitForUpdate is not defined #371

Closed
domenic opened this issue Dec 13, 2016 · 3 comments
Closed

waitForUpdate is not defined #371

domenic opened this issue Dec 13, 2016 · 3 comments

Comments

@domenic
Copy link
Collaborator

domenic commented Dec 13, 2016

I can't tell who is supposed to hold this. Is it one per document? One per PaymentRequest?

@domenic
Copy link
Collaborator Author

domenic commented Jan 19, 2017

This still remains mysterious. @adrianba @rsolomakhin any ideas what [[waitForUpdate]] is about?

@dlongley
Copy link

dlongley commented Jan 19, 2017

@domenic,

[[waitForUpdate]] is an internal slot in PaymentRequestUpdateEvent. I believe it gets flipped when someone calls updateWith from within an event handler so that:

  1. An invalid state exception will be thrown if updateWith is called more than once.
  2. As a guard that will prevent event handling from completing until unset again.

https://github.com/domenic/browser-payment-api/blob/85074dda44c64c088f87f961ac503783dc22114b/index.html#L1623-L1624

I believe its analog is the "wait to respond flag" used in the fetch spec's respondWith method.

Does that answer your question?

@domenic
Copy link
Collaborator Author

domenic commented Jan 20, 2017

Yes, that's very helpful; thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants