Merge pull request #1535 from deepak1556/contents_patch

webContents: adding serviceworker helper utilities
This commit is contained in:
Cheng Zhao 2015-05-01 14:56:35 +08:00
commit 9300859983
3 changed files with 60 additions and 0 deletions

View file

@ -852,6 +852,21 @@ Executes editing command `replace` in page.
Executes editing command `replaceMisspelling` in page.
### WebContents.hasServiceWorker(callback)
* `callback` Function
Checks if any serviceworker is registered and returns boolean as
response to `callback`.
### WebContents.unregisterServiceWorker(callback)
* `callback` Function
Unregisters any serviceworker if present and returns boolean as
response to `callback` when the JS promise is fullfilled or false
when the JS promise is rejected.
### WebContents.send(channel[, args...])
* `channel` String