feat: Expose renderer spellcheck API (#25060)

This commit is contained in:
Lishid 2020-10-19 07:48:16 -04:00 committed by GitHub
parent 321395d96e
commit 05b5c197ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 2 deletions

View file

@ -257,6 +257,20 @@ renderer process.
Returns `WebFrame` - that has the supplied `routingId`, `null` if not found.
### `webFrame.isWordMisspelled(word)`
* `word` String - The word to be spellchecked.
Returns `Boolean` - True if the word is misspelled according to the built in
spellchecker, false otherwise. If no dictionary is loaded, always return false.
### `webFrame.getWordSuggestions(word)`
* `word` String - The misspelled word.
Returns `String[]` - A list of suggested words for a given word. If the word
is spelled correctly, the result will be empty.
## Properties
### `webFrame.top` _Readonly_