|
@@ -103,7 +103,17 @@ function LocationProxy (ipcRenderer, guestId) {
|
|
|
|
|
|
function BrowserWindowProxy (ipcRenderer, guestId) {
|
|
|
this.closed = false
|
|
|
- this.location = new LocationProxy(ipcRenderer, guestId)
|
|
|
+
|
|
|
+ const location = new LocationProxy(ipcRenderer, guestId)
|
|
|
+ defineProperty(this, 'location', {
|
|
|
+ get: function () {
|
|
|
+ return location
|
|
|
+ },
|
|
|
+ set: function (url) {
|
|
|
+ url = resolveURL(url)
|
|
|
+ return ipcRenderer.sendSync('ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD_SYNC', guestId, 'loadURL', url)
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
ipcRenderer.once(`ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_CLOSED_${guestId}`, () => {
|
|
|
removeProxy(guestId)
|