We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"electron": "^2.0.3",
console errors:
[5968:0626/095527.874:ERROR:CONSOLE(4799)] "Cannot find context with specified id", source: chrome-devtools://devtoo undled/inspector.js (4799) [5968:0626/095527.874:ERROR:CONSOLE(7574)] "Extension server error: Inspector protocol error: Cannot find context wi pecified id", source: chrome-devtools://devtools/bundled/inspector.js (7574) [5968:0626/095527.878:ERROR:CONSOLE(1076)] "Getting IPC events failed", source: chrome-extension://devtron/out/index (1076) [5968:0626/095527.878:ERROR:CONSOLE(1077)] "[object Object]", source: chrome-extension://devtron/out/index.js (1077)
// public/electron.js
const { app, BrowserWindow, ipcMain } = require('electron'); const isDev = require('electron-is-dev'); function createWindow() { mainWindow = new BrowserWindow({width: 900, height: 680}); mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`); mainWindow.on('closed', () => mainWindow = null); if (isDev) { // dev tools require('devtron').install(); // load devtron mainWindow.webContents.openDevTools(); // load chrome dev tools } } ... let onlineStatus; // track online/offline status ipcMain.on('online-status-changed', (event, status) => { console.log(status); onlineStatus = status; });
// public/online.js <- loaded via script tag in index.html
const { ipcRenderer } = require('electron'); let onlineStatus = navigator.onLine; const updateOnlineStatus = () => { onlineStatus = navigator.onLine ? 'online' : 'offline'; ipcRenderer.send('online-status-changed', onlineStatus); } window.addEventListener('online', updateOnlineStatus); window.addEventListener('offline', updateOnlineStatus); updateOnlineStatus();
I can see the console messages being sent back and forth between processes.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
"electron": "^2.0.3",
console errors:
// public/electron.js
// public/online.js <- loaded via script tag in index.html
I can see the console messages being sent back and forth between processes.
The text was updated successfully, but these errors were encountered: