|
@@ -396,7 +396,7 @@ var registerWebViewElement = function () {
|
|
|
return function (...args) {
|
|
|
const internal = v8Util.getHiddenValue(this, 'internal')
|
|
|
if (internal.webContents) {
|
|
|
- return internal.webContents[m].apply(internal.webContents, args)
|
|
|
+ return internal.webContents[m](...args)
|
|
|
} else {
|
|
|
throw new Error(`Cannot call ${m} because the webContents is unavailable. The WebView must be attached to the DOM and the dom-ready event emitted before this method can be called.`)
|
|
|
}
|
|
@@ -409,7 +409,7 @@ var registerWebViewElement = function () {
|
|
|
const createNonBlockHandler = function (m) {
|
|
|
return function (...args) {
|
|
|
const internal = v8Util.getHiddenValue(this, 'internal')
|
|
|
- ipcRenderer.send.apply(ipcRenderer, ['ELECTRON_BROWSER_ASYNC_CALL_TO_GUEST_VIEW', null, internal.guestInstanceId, m].concat(args))
|
|
|
+ ipcRenderer.send('ELECTRON_BROWSER_ASYNC_CALL_TO_GUEST_VIEW', null, internal.guestInstanceId, m, ...args)
|
|
|
}
|
|
|
}
|
|
|
for (const method of nonblockMethods) {
|