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

Function toggleOpenInEditor

app/utils/devtools.js:4–12  ·  view source on GitHub ↗
(win, port)

Source from the content-addressed store, hash-verified

2
3let enabled = false
4export const toggleOpenInEditor = (win, port) => {
5 if (win.devToolsWebContents) {
6 enabled = !enabled
7 return win.devToolsWebContents.executeJavaScript(`(() => {
8 ${getCatchConsoleLogScript(port)}
9 window.__IS_OPEN_IN_EDITOR_ENABLED__ = ${enabled};
10 })()`)
11 }
12}
13
14export const isOpenInEditorEnabled = () => enabled
15

Callers 1

index.jsFile · 0.90

Calls 1

getCatchConsoleLogScriptFunction · 0.90

Tested by

no test coverage detected