🎨
This commit is contained in:
parent
e546820a4a
commit
902b34ba39
2 changed files with 10 additions and 11 deletions
|
@ -1,8 +1,8 @@
|
||||||
const { ipcRenderer } = require('electron')
|
const { ipcRenderer } = require('electron')
|
||||||
if (process) {
|
if (process) {
|
||||||
process.once('loaded', function () {
|
process.once('loaded', function () {
|
||||||
ipcRenderer.send('processArgs', process.argv)
|
ipcRenderer.send('processArgs', process.argv)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ipcRenderer.send('processArgs', 'unable to get process args')
|
ipcRenderer.send('processArgs', 'unable to get process args')
|
||||||
}
|
}
|
||||||
|
|
11
spec/fixtures/api/mixed-sandbox-app/main.js
vendored
11
spec/fixtures/api/mixed-sandbox-app/main.js
vendored
|
@ -4,12 +4,11 @@ const path = require('path')
|
||||||
|
|
||||||
const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-app-mixed-sandbox' : '/tmp/electron-app-mixed-sandbox'
|
const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-app-mixed-sandbox' : '/tmp/electron-app-mixed-sandbox'
|
||||||
|
|
||||||
process.on('uncaughtException', (error) => {
|
process.on('uncaughtException', () => {
|
||||||
app.exit(1)
|
app.exit(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.once('ready', () => {
|
app.once('ready', () => {
|
||||||
|
|
||||||
let lastArg = process.argv[process.argv.length - 1]
|
let lastArg = process.argv[process.argv.length - 1]
|
||||||
const client = net.connect(socketPath)
|
const client = net.connect(socketPath)
|
||||||
client.once('connect', () => {
|
client.once('connect', () => {
|
||||||
|
@ -20,14 +19,14 @@ app.once('ready', () => {
|
||||||
let window = new BrowserWindow({
|
let window = new BrowserWindow({
|
||||||
show: false,
|
show: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(app.getAppPath(), 'electron-app-mixed-sandbox-preload.js'),
|
preload: path.join(app.getAppPath(), 'electron-app-mixed-sandbox-preload.js'),
|
||||||
sandbox: false
|
sandbox: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
window.loadURL('data:,window')
|
window.loadURL('data:,window')
|
||||||
} else {
|
} else {
|
||||||
client.end(String(false))
|
client.end(String(false))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
client.once('end', () => {
|
client.once('end', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue