w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request-1.1/
Other
482 stars 183 forks source link

Editorial: use new user activation model #885

Closed marcoscaceres closed 4 years ago

marcoscaceres commented 4 years ago

closes #883

The following tasks have been completed:


Preview | Diff

marcoscaceres commented 4 years ago

@mustaqahmed, @domenic, ok.... first shot at this. Let me know how it looks. See also my other comments in the relevant HTML bug.

ianbjacobs commented 4 years ago

Thanks @marcoscaceres

marcoscaceres commented 4 years ago

Should this consume user activation, or just observe it? That's probably a question for implementers and/or the working group?

I think because this predates the new user activation model in HTML, it's currently "transient". It's definitely transient in Gecko right now - but I think because of the modal nature the payment sheet, we should consume user activation.

@aestes, @danyao, @rsolomakhin... the problem we are solving is:

window.onclick = () => {
   // set up payment stuff...
   const pay = request.show();
   // Does this succeed or reject? i.e., did .show() "consume" the user activation.
   document.body.requestFullscreen();
}
marcoscaceres commented 4 years ago

I’ll add tests once we deal with consume.