Closed Mutefish0 closed 1 month ago
I encountered an error when using dwn in a Web Worker.
Deno version:
deno 1.46.3 (stable, release, aarch64-apple-darwin)
create main.js:
main.js
new Worker(import.meta.resolve("./worker.js"), { type: "module", });
create worker.js:
worker.js
import { createWindow } from "https://deno.land/x/dwm@0.3.6/mod.ts"; console.log(createWindow);
run:
deno run --unstable-ffi main.js
then you will get this error:
2024-09-17 19:03:12.057 deno[71161:1360199] *** Assertion failure in -[NSMenu _setMenuName:], NSMenu.m:777
Looks like you're on macOS - macOS or any Apple platform in general does not allow UI from non-main thread. So dwm will always crash when used from a worker
Understood, thanks for the clarification!
I encountered an error when using dwn in a Web Worker.
Deno version:
Steps to Reproduce
create
main.js
:create
worker.js
:run:
then you will get this error: