[w3c/browser-payment-api] Add postMessage() and addMessageListener() for enabling "in-bound" communication (#494)

This is a concrete proposal in order to address the obstacles mentioned in https://github.com/w3c/browser-payment-api/issues/484

<code>postMessage()</code> would (after API invocation) allow the invoking (_Merchant_) page to send arbitrary messages to the payment app.

<code>addMessageListener() </code> would (after API invocation) allow the invoking page to listen for possible messages from the payment app.

AFAICT, this is probably redundant for Web-only payment apps since they should be able to use Web messaging.  However, native payment apps cannot do that since they are limited to what the payment API offers.

BTW, it is not obvious to me how the invoking page can know which payment app and method that was actually selected.  This proposal would need that as well.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/issues/494

Received on Sunday, 2 April 2017 11:20:59 UTC