electron/spec/fixtures/pages/service-worker/worker-no-node.js
Shelley Vohr 7ce94eb0b4
fix: disable nodeIntegrationInWorker for certain Worker types (#35919)
fix: disable nodeIntegrationInWorker for certain Worker types
2022-10-12 10:36:24 -04:00

6 lines
234 B
JavaScript

self.clients.matchAll({ includeUncontrolled: true }).then((clients) => {
if (!clients?.length) return;
const msg = [typeof process, typeof setImmediate, typeof global, typeof Buffer].join(' ');
clients[0].postMessage(msg);
});