From: Steinar H. Gunderson Date: Sat, 22 Feb 2020 09:59:22 +0000 (+0100) Subject: Add a function to help with logging. X-Git-Url: https://git.sesse.net/?p=ultimatescore;a=commitdiff_plain;h=683ed12730742215df4985dbf6bf34f81bbd77cf Add a function to help with logging. --- diff --git a/carousel.js b/carousel.js index 1a38e1b..cf4e575 100644 --- a/carousel.js +++ b/carousel.js @@ -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");