RESOLVED FIXED 222436
[Payment Request] log if `updateWith` is not called synchronously
https://bugs.webkit.org/show_bug.cgi?id=222436
Summary [Payment Request] log if `updateWith` is not called synchronously
Devin Rousso
Reported 2021-02-25 13:17:15 PST
According to <https://www.w3.org/TR/payment-request/#updatewith-method>: > To prevent the user interface from blocking (and to reflect changes made by the end user through the UI), developers need to immediately call `updateWith()`. AFAICT the spec doesn't specify what the user agent should do in the case that the developer doesn't immediately call `updateWith()`, but I think there should at least be a console message to help developers understand that this is expected (without expecting them to have to read the spec).
Attachments
Patch (7.91 KB, patch)
2021-02-25 13:19 PST, Devin Rousso
aestes: review+
Patch (7.91 KB, patch)
2021-02-25 13:57 PST, Devin Rousso
no flags
Patch (12.73 KB, patch)
2021-02-25 21:45 PST, Devin Rousso
no flags
Devin Rousso
Comment 1 2021-02-25 13:19:40 PST
Andy Estes
Comment 2 2021-02-25 13:54:32 PST
Comment on attachment 421557 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=421557&action=review > Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:710 > + scriptExecutionContext()->addConsoleMessage(JSC::MessageSource::PaymentRequest, JSC::MessageLevel::Error, makeString("updateWith() must be called synchronously when handling \""_s, event->type(), "\"."_s)); As we discussed, I think we should change "must" to "should".
Devin Rousso
Comment 3 2021-02-25 13:57:20 PST
Devin Rousso
Comment 4 2021-02-25 21:45:53 PST
EWS
Comment 5 2021-02-26 09:54:42 PST
Committed r273562: <https://commits.webkit.org/r273562> All reviewed patches have been landed. Closing bug and clearing flags on attachment 421608 [details].
Radar WebKit Bug Importer
Comment 6 2021-02-26 09:55:13 PST
Note You need to log in before you can comment on or make changes to this bug.