import { disableWorkerMessageHandler } from "https://deno.land/x/frugal@0.5.0/docs/dep/prism.ts";
By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
addEventListener
to communicate with its parent instance. However, if you're using Prism manually in your
own worker, you don't want it to do this.
By setting this value to true
, Prism will not add its own listeners to the worker.
You obviously have to change this value before Prism executes. To do this, you can add an empty Prism object into the global scope before loading the Prism script like this: