electron/spec/fixtures/api/utility-process/expose-main-process-module.js

7 lines
204 B
JavaScript

const { systemPreferences } = require('electron');
const status = systemPreferences.getMediaAccessStatus('screen');
process.parentPort.on('message', () => {
process.parentPort.postMessage(status);
});