Expand description
Captured console.* output with size limits.
The engine installs a console global inside every script context. Each
call (console.log, .info, .warn, .error, .debug) pushes an entry
into a shared ConsoleCapture. Output is bounded by three limits:
- max entries (count-based),
- max total bytes (sum of message lengths),
- max per-entry bytes (individual
messagetruncation).
When a limit is hit, a single system-level entry is appended noting
truncation and no further entries are recorded.
Structs§
- Console
Capture - Thread-safe capture buffer.
Functions§
- strip_
ansi - Strip ANSI escape sequences from a captured message so malicious page
content (or legitimate page
console.logbridged through) cannot poison logs with terminal control codes.