2022-09-15 16:33:08 +00:00
|
|
|
(function () {
|
2023-06-15 14:42:27 +00:00
|
|
|
const { EventEmitter } = require('node:events');
|
2022-09-15 16:33:08 +00:00
|
|
|
const emitter = new EventEmitter();
|
|
|
|
const rendererEventEmitterProperties = [];
|
|
|
|
let currentObj = emitter;
|
|
|
|
do {
|
|
|
|
rendererEventEmitterProperties.push(...Object.getOwnPropertyNames(currentObj));
|
|
|
|
} while ((currentObj = Object.getPrototypeOf(currentObj)));
|
|
|
|
const { ipcRenderer } = require('electron');
|
|
|
|
ipcRenderer.send('answer', rendererEventEmitterProperties);
|
|
|
|
})();
|