Merge pull request #5921 from electron/webview-show-definition-for-selection

Add showDefinitionForSelection to webContents/webview
This commit is contained in:
Kevin Sawicki 2016-06-08 10:40:10 -07:00
commit f4c1cd11a0
13 changed files with 25 additions and 33 deletions

View file

@ -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_

View file

@ -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:

View file

@ -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`.