electron/spec/fixtures/api/utility-process/expose-main-process-module.js
George Xu ba8ad4716b
feat: expose system preferences to utility process (#42203)
* chore: expose  system preferences to utility process

* chore: add tests, doc changes and module-list update

* relative link

* use @

* fix test

* chore: disable linux test

* kick

* noop on windows utility process
2024-06-20 11:15:57 -04:00

6 lines
204 B
JavaScript

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