we (web engine): Experimental web browser project to understand the limits of Claude

Implement Console API: console.log, console.error, console.warn #278

Open pierrelf.com
targeting main
Open opened by and assigned to pierrelf.com
targeting main

Implements issue 3mhyflupav42i — Console API (Phase 11, issue 1 of 8).

Summary #

  • Adds ConsoleOutput trait with configurable output sink (default writes to stdout/stderr)
  • Registers console as a global object with methods: log, info, debug, error, warn
  • Rich formatting for console output: arrays show [ 1, 2, 3 ], objects show { key: value }, with cycle detection and depth limiting
  • Vm::set_console_output() allows redirecting output for dev tools or testing
  • 14 new tests covering all methods, formatting, channel routing, and edge cases

Test plan #

This pull request has no versions submitted yet.