Merge pull request #2009 from deepak1556/webview_patch

override: set window.opener to null for webview
This commit is contained in:
Cheng Zhao 2015-06-23 10:03:40 +08:00
commit 2fca10ac98

View file

@ -76,6 +76,7 @@ window.prompt = ->
throw new Error('prompt() is and will not be supported.') throw new Error('prompt() is and will not be supported.')
# Simple implementation of postMessage. # Simple implementation of postMessage.
unless process.guestInstanceId?
window.opener = window.opener =
postMessage: (message, targetOrigin='*') -> postMessage: (message, targetOrigin='*') ->
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPENER_POSTMESSAGE', message, targetOrigin ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPENER_POSTMESSAGE', message, targetOrigin