chore: update to standard 12
This commit is contained in:
parent
9e85bdb02c
commit
558fff69e7
198 changed files with 4455 additions and 2940 deletions
|
@ -10,19 +10,19 @@ module is emitted.
|
|||
`screen` is an [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter).
|
||||
|
||||
**Note:** In the renderer / DevTools, `window.screen` is a reserved DOM
|
||||
property, so writing `let {screen} = require('electron')` will not work.
|
||||
property, so writing `let { screen } = require('electron')` will not work.
|
||||
|
||||
An example of creating a window that fills the whole screen:
|
||||
|
||||
```javascript
|
||||
const electron = require('electron')
|
||||
const {app, BrowserWindow} = electron
|
||||
const { app, BrowserWindow } = electron
|
||||
|
||||
let win
|
||||
|
||||
app.on('ready', () => {
|
||||
const {width, height} = electron.screen.getPrimaryDisplay().workAreaSize
|
||||
win = new BrowserWindow({width, height})
|
||||
const { width, height } = electron.screen.getPrimaryDisplay().workAreaSize
|
||||
win = new BrowserWindow({ width, height })
|
||||
win.loadURL('https://github.com')
|
||||
})
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ Another example of creating a window in the external display:
|
|||
|
||||
```javascript
|
||||
const electron = require('electron')
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
|
||||
let win
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue