Browse Source

Fix findInPage() documentation for correcting type definition

This update fixes the return type of `findInPage()`, which is currently
typed as `void` but actually it should be `number`.
rhysd 7 years ago
parent
commit
32ad59de26
2 changed files with 8 additions and 7 deletions
  1. 4 4
      docs/api/web-contents.md
  2. 4 3
      docs/api/webview-tag.md

+ 4 - 4
docs/api/web-contents.md

@@ -896,10 +896,10 @@ Inserts `text` to the focused element.
     uppercase letter followed by a lowercase or non-letter.
     Accepts several other intra-word matches, defaults to `false`.
 
-Starts a request to find all matches for the `text` in the web page and returns
-an `Integer` representing the request id used for the request. The result of
-the request can be obtained by subscribing to
-[`found-in-page`](web-contents.md#event-found-in-page) event.
+Returns `Integer` - The request id used for the request.
+
+Starts a request to find all matches for the `text` in the web page. The result of the request
+can be obtained by subscribing to [`found-in-page`](web-contents.md#event-found-in-page) event.
 
 #### `contents.stopFindInPage(action)`
 

+ 4 - 3
docs/api/webview-tag.md

@@ -520,9 +520,10 @@ Inserts `text` to the focused element.
     uppercase letter followed by a lowercase or non-letter.
     Accepts several other intra-word matches, defaults to `false`.
 
-Starts a request to find all matches for the `text` in the web page and returns an `Integer`
-representing the request id used for the request. The result of the request can be
-obtained by subscribing to [`found-in-page`](webview-tag.md#event-found-in-page) event.
+Returns `Integer` - The request id used for the request.
+
+Starts a request to find all matches for the `text` in the web page. The result of the request
+can be obtained by subscribing to [`found-in-page`](webview-tag.md#event-found-in-page) event.
 
 ### `<webview>.stopFindInPage(action)`