Fix console.error() not defined in script execution context

This commit is contained in:
Pavel Baksy 2026-05-13 00:46:46 +02:00
parent 9e0005f077
commit f5f096d97f

View File

@ -102,6 +102,9 @@ let consoleOutput = [];
const console = {{ const console = {{
log: function(...args) {{ log: function(...args) {{
consoleOutput.push(args.map(arg => String(arg)).join(' ')); consoleOutput.push(args.map(arg => String(arg)).join(' '));
}},
error: function(...args) {{
consoleOutput.push(args.map(arg => String(arg)).join(' '));
}} }}
}}; }};
@ -225,6 +228,9 @@ let consoleOutput = [];
const console = {{ const console = {{
log: function(...args) {{ log: function(...args) {{
consoleOutput.push(args.map(arg => String(arg)).join(' ')); consoleOutput.push(args.map(arg => String(arg)).join(' '));
}},
error: function(...args) {{
consoleOutput.push(args.map(arg => String(arg)).join(' '));
}} }}
}}; }};