mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
16 lines
630 B
TypeScript
16 lines
630 B
TypeScript
/**
|
|
* prismjs auto-registers a `message` listener when loaded inside a Web Worker
|
|
* (it expects JSON strings and calls JSON.parse on evt.data). Our worker
|
|
* exchanges structured-clone objects, which crashes that handler with an
|
|
* uncaught SyntaxError. Setting `self.Prism.disableWorkerMessageHandler`
|
|
* before prism-core evaluates suppresses the registration.
|
|
*
|
|
* Imported for side effects before any prismjs import — ES module evaluation
|
|
* order guarantees this runs first.
|
|
*/
|
|
(globalThis as unknown as { Prism: { disableWorkerMessageHandler: boolean } }).Prism = {
|
|
disableWorkerMessageHandler: true,
|
|
};
|
|
|
|
export {};
|