(win, port)
| 2 | |
| 3 | let enabled = false |
| 4 | export 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 | |
| 14 | export const isOpenInEditorEnabled = () => enabled |
| 15 |
no test coverage detected