webContents: adding serviceworker helper utilities

This commit is contained in:
deepak1556 2015-04-30 18:45:19 +05:30
parent ea74e825c9
commit d76bd4a103
3 changed files with 60 additions and 0 deletions

View file

@ -846,6 +846,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