Issues in loading a .glb file in a web worker

I have been trying to use GLTFLoader from Three.js to load a model into an offScreenCanvas. This is what I am currently trying:

import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
const loader = new GLTFLoader();
const draco = new DRACOLoader();
draco.setDecoderConfig({ type: "js" });


const res = await fetch("");
  if (!res.ok) return;
  const arrayBuffer = await res.arrayBuffer();
    (gltf) => {
      console.log("gltf loaded is", gltf);
    (error) => {
      console.log("error", error);

Neither the onload nor the onerror callback gets triggered. I am very new to using web workers in javascript. But I am completely at a loss here.

I have tried to use loader.load as well, but to no avail. it seems like the callbacks just won’t get called. Where am I going wrong?