MCPcopy Create free account
hub / github.com/jhen0409/react-native-debugger / handleURL

Function handleURL

electron/url-handle/handleURL.js:38–52  ·  view source on GitHub ↗
(getWindow, path)

Source from the content-addressed store, hash-verified

36}
37
38export 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
54const listenOpenURL = (getWindow) => app.on('open-url', (e, path) => {
55 handleURL(getWindow, path)

Callers 3

handleCommandLineFunction · 0.90
listenOpenURLFunction · 0.85
createHandleURLServerFunction · 0.85

Calls 1

parseUrlFunction · 0.85

Tested by

no test coverage detected