summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/WorkerDebugger.initialize_es_worker.js
blob: 1b9ddda76992f92ccab19d66f97618bb5f8176c2 (plain)
1
2
3
4
5
6
7
8
9
10
"use strict";

// The following check is one possible way to identify
// if this script is loaded as a ES Module or the classic way.
const isLoadedAsEsModule = this != globalThis;

// Here we expect the worker to be loaded a ES Module
if (isLoadedAsEsModule) {
  postMessage("worker");
}