js → javascript
This commit is contained in:
parent
e71280f31c
commit
cc2b95fac3
6 changed files with 8 additions and 8 deletions
|
@ -41,7 +41,7 @@ otherwise it returns `undefined`.
|
||||||
The `filters` specifies an array of file types that can be displayed or
|
The `filters` specifies an array of file types that can be displayed or
|
||||||
selected when you want to limit the user to a specific type. For example:
|
selected when you want to limit the user to a specific type. For example:
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
{
|
{
|
||||||
filters: [
|
filters: [
|
||||||
{name: 'Images', extensions: ['jpg', 'png', 'gif']},
|
{name: 'Images', extensions: ['jpg', 'png', 'gif']},
|
||||||
|
|
|
@ -359,7 +359,7 @@ the first item.
|
||||||
|
|
||||||
Template:
|
Template:
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
[
|
[
|
||||||
{label: '4', id: '4'},
|
{label: '4', id: '4'},
|
||||||
{label: '5', id: '5'},
|
{label: '5', id: '5'},
|
||||||
|
@ -381,7 +381,7 @@ Menu:
|
||||||
|
|
||||||
Template:
|
Template:
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
[
|
[
|
||||||
{label: 'a', position: 'endof=letters'},
|
{label: 'a', position: 'endof=letters'},
|
||||||
{label: '1', position: 'endof=numbers'},
|
{label: '1', position: 'endof=numbers'},
|
||||||
|
|
|
@ -197,7 +197,7 @@ Sets when the tray's icon background becomes highlighted (in blue).
|
||||||
by toggling between `'never'` and `'always'` modes when the window visibility
|
by toggling between `'never'` and `'always'` modes when the window visibility
|
||||||
changes.
|
changes.
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
const {BrowserWindow, Tray} = require('electron')
|
const {BrowserWindow, Tray} = require('electron')
|
||||||
|
|
||||||
const win = new BrowserWindow({width: 800, height: 600})
|
const win = new BrowserWindow({width: 800, height: 600})
|
||||||
|
|
|
@ -22,7 +22,7 @@ console.log(contents)
|
||||||
|
|
||||||
These methods can be accessed from the `webContents` module:
|
These methods can be accessed from the `webContents` module:
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
const {webContents} = require('electron')
|
const {webContents} = require('electron')
|
||||||
console.log(webContents)
|
console.log(webContents)
|
||||||
```
|
```
|
||||||
|
@ -843,7 +843,7 @@ The `callback` will be called with `callback(error, data)` on completion. The
|
||||||
|
|
||||||
By default, an empty `options` will be regarded as:
|
By default, an empty `options` will be regarded as:
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
{
|
{
|
||||||
marginsType: 0,
|
marginsType: 0,
|
||||||
printBackground: false,
|
printBackground: false,
|
||||||
|
|
|
@ -119,7 +119,7 @@ console.log(webFrame.getResourceUsage())
|
||||||
|
|
||||||
This will generate:
|
This will generate:
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
{
|
{
|
||||||
images: {
|
images: {
|
||||||
count: 22,
|
count: 22,
|
||||||
|
|
|
@ -18,7 +18,7 @@ has helpers to access Electron APIs in your tests and bundles ChromeDriver.
|
||||||
$ npm install --save-dev spectron
|
$ npm install --save-dev spectron
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```javascript
|
||||||
// A simple test to verify a visible window is opened with a title
|
// A simple test to verify a visible window is opened with a title
|
||||||
var Application = require('spectron').Application
|
var Application = require('spectron').Application
|
||||||
var assert = require('assert')
|
var assert = require('assert')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue