Commit 8d5429ca authored by Grant's avatar Grant
Browse files

remove window from worker script

parent 869ead28
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -12,7 +12,9 @@ renderer.on("ready", () => {
  postMessage({ type: "ready" });
});

window.addEventListener("message", (req) => {
// this is a worker context, window is not available here
// eslint-disable-next-line no-restricted-globals
addEventListener("message", (req) => {
  switch (req.data.type) {
    case "canvas": {
      const canvas: OffscreenCanvas = req.data.canvas;