gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-playground] branch master updated: fix JS


From: gnunet
Subject: [GNUnet-SVN] [taler-playground] branch master updated: fix JS
Date: Wed, 07 Mar 2018 17:37:37 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository playground.

The following commit(s) were added to refs/heads/master by this push:
     new 4745668  fix JS
4745668 is described below

commit 474566840d5ef858c6b79a37893a2ce799316b97
Author: Florian Dold <address@hidden>
AuthorDate: Wed Mar 7 17:37:30 2018 +0100

    fix JS
---
 .../playground/templates/detection-js.html           | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/talerplayground/playground/templates/detection-js.html 
b/talerplayground/playground/templates/detection-js.html
index e10bef8..059a5bf 100644
--- a/talerplayground/playground/templates/detection-js.html
+++ b/talerplayground/playground/templates/detection-js.html
@@ -3,15 +3,17 @@
 {% block scripts %}
 <script src="static/web-common/taler-wallet-lib.js"></script>
 <script>
-let logEl = document.getElementById("log");
-function log(s) {
-  logEl.innerText = logEl.innerText + "\n" + s;
-}
-taler.onPresent(() => {
-  log("present at" + new Date());
-});
-taler.onAbsent(() => {
-  log("absent at" + new Date());
+document.addEventListener("DOMContentLoaded", () => {
+  let logEl = document.getElementById("log");
+  function log(s) {
+    logEl.innerText = logEl.innerText + "\n" + s;
+  }
+  taler.onPresent(() => {
+    log("present at " + new Date());
+  });
+  taler.onAbsent(() => {
+    log("absent at " + new Date());
+  });
 });
 </script>
 {% endblock %}

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]