refactor: remove ServiceWorker APIs from WebContents (#16717)

This commit is contained in:
Shelley Vohr 2019-02-04 22:22:46 -08:00 committed by GitHub
parent 3aa8ec0818
commit f303caa87c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 103 deletions

View file

@ -29,7 +29,6 @@ When a majority of affected functions are migrated, this flag will be enabled by
- [ses.getBlobData(identifier, callback)](https://github.com/electron/electron/blob/master/docs/api/session.md#getBlobData)
- [ses.clearAuthCache(options[, callback])](https://github.com/electron/electron/blob/master/docs/api/session.md#clearAuthCache)
- [contents.executeJavaScript(code[, userGesture, callback])](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#executeJavaScript)
- [contents.unregisterServiceWorker(callback)](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#unregisterServiceWorker)
- [contents.print([options], [callback])](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#print)
- [contents.printToPDF(options, callback)](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#printToPDF)
- [contents.savePage(fullPath, saveType, callback)](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#savePage)
@ -55,4 +54,3 @@ When a majority of affected functions are migrated, this flag will be enabled by
- [webviewTag.capturePage([rect, ]callback)](https://github.com/electron/electron/blob/master/docs/api/webview-tag.md#capturePage)
- [win.capturePage([rect, ]callback)](https://github.com/electron/electron/blob/master/docs/api/browser-window.md#capturePage)
- [desktopCapturer.getSources(options, callback)](https://github.com/electron/electron/blob/master/docs/api/desktop-capturer.md#getSources)
- [contents.hasServiceWorker(callback)](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#hasServiceWorker)

View file

@ -1156,29 +1156,6 @@ that stores data of the snapshot. Omitting `rect` will capture the whole visible
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page.
#### `contents.hasServiceWorker(callback)`
* `callback` Function
* `hasWorker` Boolean
Checks if any ServiceWorker is registered and returns a boolean as
response to `callback`.
**[Deprecated Soon](promisification.md)**
#### `contents.hasServiceWorker()`
Returns `Promise<Boolean>` - Resolves with a boolean depending on whether or not the current `webContents` has a registered ServiceWorker
#### `contents.unregisterServiceWorker(callback)`
* `callback` Function
* `success` Boolean
Unregisters any ServiceWorker if present and returns a boolean as
response to `callback` when the JS promise is fulfilled or false
when the JS promise is rejected.
#### `contents.getPrinters()`
Get the system printer list.