Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
feat: update source content
Browse files Browse the repository at this point in the history
  • Loading branch information
electron-bot committed Jun 2, 2020
1 parent eb0afaf commit 7145523
Show file tree
Hide file tree
Showing 9 changed files with 269 additions and 255 deletions.
2 changes: 2 additions & 0 deletions content/current/en-US/docs/api/browser-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
visible to users.
* `spellcheck` Boolean (optional) - Whether to enable the builtin spellchecker.
Default is `true`.
* `enableWebSQL` Boolean (optional) - Whether to enable the [WebSQL api](https://www.w3.org/TR/webdatabase/).
Default is `true`.

When setting minimum or maximum window size with `minWidth`/`maxWidth`/
`minHeight`/`maxHeight`, it only constrains the users. It won't prevent you from
Expand Down
2 changes: 1 addition & 1 deletion content/current/en-US/docs/api/menu-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ a `type`.
The `role` property can have following values:

* `undo`
* `about` - Trigger a native about panel (custom message box on Window, which does not provide its own).
* `redo`
* `cut`
* `copy`
Expand All @@ -94,7 +95,6 @@ The `role` property can have following values:
The following additional roles are available on _macOS_:

* `appMenu` - Whole default "App" menu (About, Services, etc.)
* `about` - Map to the `orderFrontStandardAboutPanel` action.
* `hide` - Map to the `hide` action.
* `hideOthers` - Map to the `hideOtherApplications` action.
* `unhide` - Map to the `unhideAllApplications` action.
Expand Down
8 changes: 4 additions & 4 deletions content/current/en-US/docs/api/web-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -871,10 +871,10 @@ Returns `String` - The URL of the current web page.
```javascript
const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ width: 800, height: 600 })
win.loadURL('http://github.com')

let currentURL = win.webContents.getURL()
console.log(currentURL)
win.loadURL('http://github.com').then(() => {
const currentURL = win.webContents.getURL()
console.log(currentURL)
})
```

#### `contents.getTitle()`
Expand Down
6 changes: 5 additions & 1 deletion content/current/en-US/docs/api/web-frame.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,14 @@ this limitation.
* `error` Error

Returns `Promise<any>` - A promise that resolves with the result of the executed
code or is rejected if execution throws or results in a rejected promise.
code or is rejected if execution could not start.

Works like `executeJavaScript` but evaluates `scripts` in an isolated context.

Note that when the execution of script fails, the returned promise will not
reject and the `result` would be `undefined`. This is because Chromium does not
dispatch errors of isolated worlds to foreign worlds.

### `webFrame.setIsolatedWorldInfo(worldId, info)`
* `worldId` Integer - The ID of the world to run the javascript in, `0` is the default world, `999` is the world used by Electrons `contextIsolation` feature. Chrome extensions reserve the range of IDs in `[1 << 20, 1 << 29)`. You can provide any integer here.
* `info` Object
Expand Down
Loading

0 comments on commit 7145523

Please sign in to comment.