maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Feature]: make console.log correctly handle varargs

Open perkinslr opened this issue 3 years ago • 0 comments

Feature Request

In standard javascript implementations, console.log's signature is console.log(...objects). The console.log implementation used in the html5 netscape context is console.log(string), silently discarding all but the first argument, which is naivly converted to a string.

Additionally, just calling (or implying) obj.toString() on each argument to console.log does not match the way arguments are converted to strings by standard implementations of console.log.

The Solution you'd like

Implement proper varargs wrapper around MapTool.log(string), complete with json encoding arrays and maps, while stringifying other objects.

Alternatives that you've considered.

No response

Additional Context

No response

perkinslr avatar Jul 20 '22 17:07 perkinslr