main.js 549 B

1234567891011121314151617
  1. // Retrieve information about screen size, displays, cursor position, etc.
  2. //
  3. // For more info, see:
  4. // https://www.electronjs.org/docs/latest/api/screen
  5. const { app, BrowserWindow, screen } = require('electron/main')
  6. let mainWindow = null
  7. app.whenReady().then(() => {
  8. // Create a window that fills the screen's available work area.
  9. const primaryDisplay = screen.getPrimaryDisplay()
  10. const { width, height } = primaryDisplay.workAreaSize
  11. mainWindow = new BrowserWindow({ width, height })
  12. mainWindow.loadURL('https://electronjs.org')
  13. })