guix-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Mathieu Othacehe
Date: Tue, 15 Sep 2020 08:34:46 -0400 (EDT)

branch: master
commit 21a9b2b38620a2e0a608789c51a8166625a087ff
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Sep 15 09:48:20 2020 +0200

    Do not override onload callback.
    
    * src/cuirass/templates.scm (make-line-chart): Do not override onload 
callback
    as that would prevent us from adding multiple charts.
---
 src/cuirass/templates.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index e5a7526..12df6e0 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -853,10 +853,11 @@ and BUILD-MAX are global minimal and maximal row 
identifiers."
                                (title . ((display . #t)
                                          (text . ,title)))
                                (scales . ,scales))))))
-    `((script ,(format #f "window.onload = function() {\
+    `((script ,(format #f "window.addEventListener(\"load\",
+function(event) {\
 window.~a = new Chart\
 (document.getElementById('~a').getContext('2d'), ~a);\
-};" id id (scm->json-string chart))))))
+});" id id (scm->json-string chart))))))
 
 (define* (global-metrics-content #:key
                                  builds-per-day



reply via email to

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