INNER CODE UNIT · JavaScript

createWindow

open-source-labs/Swell · main.js:129

function createWindow() {
  // create the new browser window instance
  mainWindow = new BrowserWindow({
    width: 2000,
    height: 1000,
    title: 'Swell', // Ensure the app has a title with first letter capitalized
    minWidth: 1000,
    minHeight: 600,
    backgroundColor: '-webkit-linear-gradient(top, #3dadc2 0%,#2f4858 100%)',
    show: false,
    webPreferences: {
      nodeIntegration: false,
      contextIsolation: process.env.NODE_ENV !== 'test', // true if in dev mode
      sandbox: process.env.NODE_ENV !== 'test',
      webSecurity: true,
      preload: path.resolve(__dirname, 'preload.js'),
    },
    icon: `${__dirname}/src/assets/icons/64x64.png`,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…