chore: remove promisification deprecation callbacks (#17907)
* chore: remove promisification deprecation callbacks * update docs * fix smoke test * fix executejs issue * cleanup leftovers * fix webContents.executeJavaScript tests * cleanup WebContents.prototype.takeHeapSnapshot * fix "sets arbitrary webContents as devtools" test * fix executeJavaScriptInFrame related tests
This commit is contained in:
parent
fdf5f838f4
commit
d87b3ead76
44 changed files with 94 additions and 1418 deletions
|
@ -19,7 +19,7 @@ function mapSources (sources) {
|
|||
}))
|
||||
}
|
||||
|
||||
const getSources = (options) => {
|
||||
exports.getSources = (options) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!isValid(options)) throw new Error('Invalid options')
|
||||
|
||||
|
@ -40,5 +40,3 @@ const getSources = (options) => {
|
|||
.then(sources => resolve(mapSources(sources)), reject)
|
||||
})
|
||||
}
|
||||
|
||||
exports.getSources = deprecate.promisify(getSources)
|
||||
|
|
|
@ -85,15 +85,6 @@ function getWebFrame (context: Window) {
|
|||
return context ? new WebFrame(context) : null
|
||||
}
|
||||
|
||||
const promisifiedMethods = new Set<string>([
|
||||
'executeJavaScript',
|
||||
'executeJavaScriptInIsolatedWorld'
|
||||
])
|
||||
|
||||
for (const method of promisifiedMethods) {
|
||||
(WebFrame as any).prototype[method] = deprecate.promisify((WebFrame as any).prototype[method])
|
||||
}
|
||||
|
||||
const _webFrame = new WebFrame(window)
|
||||
|
||||
export default _webFrame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue