commit 3d81995b4d1cc195b995200e23e36fa8074aeb0c parent 25435f17fe362ca6938aa4abb6c87ac8a9bceec6 Author: Marcello Stanisci <marcello.stanisci@inria.fr> Date: Thu, 3 Sep 2015 18:27:52 +0200 adding the "onload" requirement for not loosing signals to the wallet Diffstat:
| M | api-merchant.rst | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/api-merchant.rst b/api-merchant.rst @@ -113,6 +113,8 @@ for those fields prepended with `GNUNET_`. .. _deposit permission: + * **deposit permission**: + .. sourcecode:: c struct DepositPermission @@ -141,6 +143,20 @@ option (for example on a "checkout" page), it sends the following event: .. js:data:: taler-payment-mfirst +.. note:: + this event must be sent from a callback for the `onload` event of the `BODY` element, + otherwise the extension would have not time to register a listener for this event. + For example: + +.. sourcecode:: html + + <body onload="function(){ + // set up the listener for 'taler-wallet-mfirst' + // ... + let eve = new Event('taler-payment-first'); + document.body.dispatchEvent(eve); + };"> ... </body> + and the wallet will reply with a .. js:data:: taler-wallet-mfirst