Update console.log implementation to support multiple params #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Summary
This PR fixes a couple of incompatibilities between the console.debug/log/warn/error statements.
console.log("a", "b", "c");
in the exits js-pdk does not output the expecteda b c
but just outputsa
. also, an empty console.log errors out, but it normally is a no-op.Test script
Output in chrome devtools
Output in current js-pdk
note that the no-op behavior of an empty call is not present here and it instead errors.
Output in current js-pdk with empty calls removed
note the multi-statement lines do not print all arguments.
Output with the code change from the PR (including empty statements)
note that the empty statements are properly no-ops, and the multiple args are properly printed.