]> git.sesse.net Git - ultimatescore/commitdiff
Add a function to help with logging.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Feb 2020 09:59:22 +0000 (10:59 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Feb 2020 09:59:22 +0000 (10:59 +0100)
carousel.js

index 1a38e1b7d077fd17251333fa9ad14996c067da52..cf4e5751d23bd17a77832614d731a59167371338 100644 (file)
@@ -1,5 +1,16 @@
 'use strict';
 
+// Log with deep clone, so that the browser will show the object at time of log,
+// instead of what it looks like at time of view.
+function dlog()
+{
+       let args = [];
+       for (const arg of arguments) {
+               args.push(JSON.parse(JSON.stringify(arg)));
+       }
+       console.log(args);
+}
+
 function addheading(carousel, colspan, content)
 {
        let thead = document.createElement("thead");