mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Remove unintended returns
This commit is contained in:
@@ -21,7 +21,7 @@ var BrowserWindowProxy = (function () {
|
||||
}
|
||||
|
||||
BrowserWindowProxy.remove = function (guestId) {
|
||||
return delete this.proxies[guestId]
|
||||
delete this.proxies[guestId]
|
||||
}
|
||||
|
||||
function BrowserWindowProxy (guestId1) {
|
||||
@@ -69,11 +69,11 @@ var BrowserWindowProxy = (function () {
|
||||
if (targetOrigin == null) {
|
||||
targetOrigin = '*'
|
||||
}
|
||||
return ipcRenderer.send('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_POSTMESSAGE', this.guestId, message, targetOrigin, window.location.origin)
|
||||
ipcRenderer.send('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_POSTMESSAGE', this.guestId, message, targetOrigin, window.location.origin)
|
||||
}
|
||||
|
||||
BrowserWindowProxy.prototype['eval'] = function (...args) {
|
||||
return ipcRenderer.send.apply(ipcRenderer, ['ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', this.guestId, 'executeJavaScript'].concat(args))
|
||||
ipcRenderer.send.apply(ipcRenderer, ['ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', this.guestId, 'executeJavaScript'].concat(args))
|
||||
}
|
||||
|
||||
return BrowserWindowProxy
|
||||
@@ -205,7 +205,7 @@ ipcRenderer.on('ELECTRON_GUEST_WINDOW_POSTMESSAGE', function (event, sourceId, m
|
||||
|
||||
// Forward history operations to browser.
|
||||
var sendHistoryOperation = function (...args) {
|
||||
return ipcRenderer.send.apply(ipcRenderer, ['ELECTRON_NAVIGATION_CONTROLLER'].concat(args))
|
||||
ipcRenderer.send.apply(ipcRenderer, ['ELECTRON_NAVIGATION_CONTROLLER'].concat(args))
|
||||
}
|
||||
|
||||
var getHistoryOperation = function (...args) {
|
||||
@@ -213,15 +213,15 @@ var getHistoryOperation = function (...args) {
|
||||
}
|
||||
|
||||
window.history.back = function () {
|
||||
return sendHistoryOperation('goBack')
|
||||
sendHistoryOperation('goBack')
|
||||
}
|
||||
|
||||
window.history.forward = function () {
|
||||
return sendHistoryOperation('goForward')
|
||||
sendHistoryOperation('goForward')
|
||||
}
|
||||
|
||||
window.history.go = function (offset) {
|
||||
return sendHistoryOperation('goToOffset', offset)
|
||||
sendHistoryOperation('goToOffset', offset)
|
||||
}
|
||||
|
||||
Object.defineProperty(window.history, 'length', {
|
||||
|
||||
Reference in New Issue
Block a user