Browse code

add some debug

louis.jonget authored on27/06/2022 11:53:33
Showing1 changed files
... ...
@@ -10,6 +10,7 @@ var retry;
10 10
 retry = 1;
11 11
 
12 12
 function xhr_to_syno(method, url_path, onload_function, max_retry) {
13
+  console.log('------xhr start')
13 14
   status = "";
14 15
   if (localStorage.getItem('username') && localStorage.getItem('password') && localStorage.getItem('server')) {
15 16
     var username = localStorage.getItem('username');
... ...
@@ -20,8 +21,9 @@ function xhr_to_syno(method, url_path, onload_function, max_retry) {
20 21
     xhr.timeout = 3000; // time in milliseconds
21 22
 
22 23
     xhr.open(method, url, true);
23
-
24
+    console.log('------xhr opened')
24 25
     xhr.onload = function () {
26
+      console.log('------xhr onload')
25 27
       if (xhr.readyState === 4) {
26 28
         retry = 1;
27 29
         console.log('------xhr request returned');