Skip to content

Commit

Permalink
ensure callback compat
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 16, 2019
1 parent 76de744 commit 92326cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/browser/api/web-contents.js
Expand Up @@ -111,6 +111,7 @@ WebContents.prototype.send = function (channel, ...args) {

return this._send(internal, sendToAll, channel, args)
}

WebContents.prototype.sendToAll = function (channel, ...args) {
if (typeof channel !== 'string') {
throw new Error('Missing required channel argument')
Expand Down Expand Up @@ -209,6 +210,9 @@ WebContents.prototype.executeJavaScript = function (code, hasUserGesture, callba
}
}

WebContents.prototype.getZoomLevel = deprecate.promisify(this.getZoomLevel, 0)
WebContents.prototype.getZoomFactor = deprecate.promisify(this.getZoomFactor, 0)

WebContents.prototype.takeHeapSnapshot = function (filePath) {
return new Promise((resolve, reject) => {
const channel = `ELECTRON_TAKE_HEAP_SNAPSHOT_RESULT_${getNextId()}`
Expand Down

0 comments on commit 92326cd

Please sign in to comment.