INNER CODE UNIT · TypeScript

createWindow

open-source-labs/Chronos · electron/Main.ts:21

const createWindow = () => {
  win = new BrowserWindow({
    width: 1920,
    height: 1080,
    backgroundColor: '#000314',
    frame: false,
    titleBarStyle: 'hidden',
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false,
    },
  });

  if (process.env.NODE_ENV === 'development') {
    // Development: load the application window to the port in the webpack config
    win.loadURL('http://localhost:8080/');

    // Uncomment below to use Dev Tools on Electron

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…