(getWindow, path)
| 36 | } |
| 37 | |
| 38 | export const handleURL = async (getWindow, path) => { |
| 39 | const query = parseUrl(path) |
| 40 | if (!query) { |
| 41 | return |
| 42 | } |
| 43 | const payload = JSON.stringify(query) |
| 44 | |
| 45 | // This env will be get by new debugger window |
| 46 | process.env.DEBUGGER_SETTING = payload |
| 47 | const win = await getWindow(query.host, query.port) |
| 48 | // if we can get the exists window, it will send the IPC event |
| 49 | if (win) { |
| 50 | win.webContents.send('set-debugger-loc', payload) |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | const listenOpenURL = (getWindow) => app.on('open-url', (e, path) => { |
| 55 | handleURL(getWindow, path) |
no test coverage detected