While using print as a top-level invocation works, if you call print in any closure handler, such as onclick, addEventListener etc, print output is not redirected to console.log. Apparently, there isn't anything that reads from stdout and redirects to console.log at that point.
While using
printas a top-level invocation works, if you callprintin any closure handler, such asonclick,addEventListeneretc,printoutput is not redirected toconsole.log. Apparently, there isn't anything that reads from stdout and redirects toconsole.logat that point.