From d41f7cafd4a2b775d912ee7ac533acaec55a130f Mon Sep 17 00:00:00 2001 From: Jonas Bengtsson Date: Fri, 22 Mar 2024 08:11:05 +0100 Subject: [PATCH] feat: support console.info and .debug in javascript engine (#18) --- src/engine/javascript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/javascript.js b/src/engine/javascript.js index 43a8771..59c3f16 100644 --- a/src/engine/javascript.js +++ b/src/engine/javascript.js @@ -42,7 +42,7 @@ async function execCode(code) { function patchConsole(messages) { const consoleProxy = new Proxy(console, { get(target, prop) { - if (prop === "log" || prop === "error" || prop === "warn") { + if (prop === "log" || prop === "error" || prop === "warn" || prop === "info" || prop === "debug") { return (...args) => { const message = args.map((obj) => stringify(obj)).join(" "); messages.push(message);