Make BrowserWindowProxy guestId non-writeable

This commit is contained in:
Kevin Sawicki 2016-06-09 13:41:42 -07:00
parent a3899f17f9
commit 2f93735909

View file

@ -25,7 +25,13 @@ var BrowserWindowProxy = (function () {
}
function BrowserWindowProxy (guestId1) {
this.guestId = guestId1
Object.defineProperty(this, 'guestId', {
configurable: false,
enumerable: true,
writeable: false,
value: guestId1
})
this.closed = false
ipcRenderer.once('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_CLOSED_' + this.guestId, () => {
BrowserWindowProxy.remove(this.guestId)