9 lines
263 B
JavaScript
9 lines
263 B
JavaScript
|
const { ipcRenderer, webFrame } = require('electron');
|
||
|
|
||
|
webFrame.executeJavaScript(`(() => {
|
||
|
return {};
|
||
|
})()`).then((obj) => {
|
||
|
// Considered safe if the object is constructed in this world
|
||
|
ipcRenderer.send('executejs-safe', obj.constructor === Object);
|
||
|
});
|