]> git.sesse.net Git - ultimatescore/blobdiff - carousel.js
Add a function to help with logging.
[ultimatescore] / 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");