summaryrefslogtreecommitdiff
path: root/api-merchant.rst
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2015-09-03 18:27:52 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2015-09-03 18:27:52 +0200
commit3d81995b4d1cc195b995200e23e36fa8074aeb0c (patch)
tree96b682a9f07c032c68ee125a5dd1fe90025be9ca /api-merchant.rst
parent25435f17fe362ca6938aa4abb6c87ac8a9bceec6 (diff)
downloaddocs-3d81995b4d1cc195b995200e23e36fa8074aeb0c.tar.gz
docs-3d81995b4d1cc195b995200e23e36fa8074aeb0c.tar.bz2
docs-3d81995b4d1cc195b995200e23e36fa8074aeb0c.zip
adding the "onload" requirement for
not loosing signals to the wallet
Diffstat (limited to 'api-merchant.rst')
-rw-r--r--api-merchant.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/api-merchant.rst b/api-merchant.rst
index 83dc8f2f..afa74591 100644
--- 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