mirror of
https://github.com/electron/electron.git
synced 2026-02-04 12:15:22 -05:00
* docs: remove original class names in customize menus example * docs: remove original class names in shortcuts example * lint: run standard
21 lines
627 B
JavaScript
21 lines
627 B
JavaScript
// Retrieve information about screen size, displays, cursor position, etc.
|
|
//
|
|
// For more info, see:
|
|
// https://electronjs.org/docs/api/screen
|
|
|
|
const { app, BrowserWindow } = require('electron')
|
|
|
|
let mainWindow = null
|
|
|
|
app.on('ready', () => {
|
|
// We cannot require the screen module until the app is ready.
|
|
const { screen } = require('electron')
|
|
|
|
// Create a window that fills the screen's available work area.
|
|
const primaryDisplay = screen.getPrimaryDisplay()
|
|
const { width, height } = primaryDisplay.workAreaSize
|
|
|
|
mainWindow = new BrowserWindow({ width, height })
|
|
mainWindow.loadURL('https://electronjs.org')
|
|
})
|