commit 18132bf9c9755a7de41a8c89dc6b02409a629cd5 parent 54825bc0aeb8192c4526a43a5e0fd78cda9561af Author: Sebastiano Tronto <sebastiano@tronto.net> Date: Fri, 6 Jun 2025 15:25:54 +0200 small adjustment Diffstat:
M | 05_callback/worker.mjs | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/05_callback/worker.mjs b/05_callback/worker.mjs @@ -2,7 +2,10 @@ import Primes from "./build/primes.mjs"; var primes = await Primes(); const logPtr = primes.addFunction((cstr) => { - postMessage({ message: primes.UTF8ToString(cstr) }); + const str = primes.UTF8ToString(cstr); + + console.log(str); + postMessage({ message: str }); }, "vp"); onmessage = (e) => {