standardize all javascript blocks in English docs
This commit is contained in:
parent
dd9935a9d7
commit
06a354a2eb
37 changed files with 567 additions and 445 deletions
|
@ -20,6 +20,9 @@ before the app ready event. Also, turn on `plugins` option of `BrowserWindow`.
|
|||
For example:
|
||||
|
||||
```javascript
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
const path = require('path')
|
||||
|
||||
// Specify flash path, supposing it is placed in the same directory with main.js.
|
||||
let pluginName
|
||||
switch (process.platform) {
|
||||
|
@ -39,7 +42,7 @@ app.commandLine.appendSwitch('ppapi-flash-path', path.join(__dirname, pluginName
|
|||
app.commandLine.appendSwitch('ppapi-flash-version', '17.0.0.169')
|
||||
|
||||
app.on('ready', () => {
|
||||
win = new BrowserWindow({
|
||||
let win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
|
@ -48,7 +51,7 @@ app.on('ready', () => {
|
|||
})
|
||||
win.loadURL(`file://${__dirname}/index.html`)
|
||||
// Something else
|
||||
});
|
||||
})
|
||||
```
|
||||
|
||||
You can also try loading the system wide Pepper Flash plugin instead of shipping
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue