From c5936a024dbeaafb42430d616c4f2421d9eebc98 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 14 Dec 2015 16:54:26 -0800 Subject: [PATCH] Remove unneeded custom postMessage on window.opener --- atom/renderer/lib/override.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/atom/renderer/lib/override.coffee b/atom/renderer/lib/override.coffee index 8b33c6e2237c..ba15c7b3f61a 100644 --- a/atom/renderer/lib/override.coffee +++ b/atom/renderer/lib/override.coffee @@ -92,10 +92,7 @@ window.prompt = -> throw new Error('prompt() is and will not be supported.') openerId = ipcRenderer.sendSync 'ATOM_SHELL_GUEST_WINDOW_MANAGER_GET_OPENER_ID' -if openerId? - window.opener = BrowserWindowProxy.getOrCreate(openerId) - window.opener.postMessage = (message, targetOrigin='*') -> - ipcRenderer.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPENER_POSTMESSAGE', message, targetOrigin, location.origin +window.opener = BrowserWindowProxy.getOrCreate(openerId) if openerId? ipcRenderer.on 'ATOM_SHELL_GUEST_WINDOW_POSTMESSAGE', (event, sourceId, message, sourceOrigin) -> # Manually dispatch event instead of using postMessage because we also need to