Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add exemplary fiddle for
launch in fiddle
feat (#19759)
* add fit-screen * new url format * nit
- Loading branch information
1 parent
db21391
commit e590954
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 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') | ||
}) |