Merge pull request #5921 from electron/webview-show-definition-for-selection
Add showDefinitionForSelection to webContents/webview
This commit is contained in:
commit
f4c1cd11a0
13 changed files with 25 additions and 33 deletions
|
@ -885,7 +885,7 @@ The `flags` is an array that can include following `String`s:
|
|||
|
||||
### `win.showDefinitionForSelection()` _OS X_
|
||||
|
||||
Shows pop-up dictionary that searches the selected word on the page.
|
||||
Same as `webContents.showDefinitionForSelection()`.
|
||||
|
||||
### `win.setIcon(icon)` _Windows_ _Linux_
|
||||
|
||||
|
|
|
@ -957,6 +957,10 @@ win.webContents.on('did-finish-load', () => {
|
|||
});
|
||||
```
|
||||
|
||||
### `webContents.showDefinitionForSelection()` _OS X_
|
||||
|
||||
Shows pop-up dictionary that searches the selected word on the page.
|
||||
|
||||
## Instance Properties
|
||||
|
||||
`WebContents` objects also have the following properties:
|
||||
|
|
|
@ -490,6 +490,10 @@ Sends an input `event` to the page.
|
|||
See [webContents.sendInputEvent](web-contents.md##webcontentssendinputeventevent)
|
||||
for detailed description of `event` object.
|
||||
|
||||
### `<webview>.showDefinitionForSelection()` _OS X_
|
||||
|
||||
Shows pop-up dictionary that searches the selected word on the page.
|
||||
|
||||
### `<webview>.getWebContents()`
|
||||
|
||||
Returns the [WebContents](web-contents.md) associated with this `webview`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue