Merge pull request #2009 from deepak1556/webview_patch
override: set window.opener to null for webview
This commit is contained in:
commit
2fca10ac98
1 changed files with 4 additions and 3 deletions
|
@ -76,9 +76,10 @@ 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.
|
||||||
window.opener =
|
unless process.guestInstanceId?
|
||||||
postMessage: (message, targetOrigin='*') ->
|
window.opener =
|
||||||
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPENER_POSTMESSAGE', message, targetOrigin
|
postMessage: (message, targetOrigin='*') ->
|
||||||
|
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPENER_POSTMESSAGE', message, targetOrigin
|
||||||
|
|
||||||
ipc.on 'ATOM_SHELL_GUEST_WINDOW_POSTMESSAGE', (message, targetOrigin) ->
|
ipc.on 'ATOM_SHELL_GUEST_WINDOW_POSTMESSAGE', (message, targetOrigin) ->
|
||||||
window.postMessage message, targetOrigin
|
window.postMessage message, targetOrigin
|
||||||
|
|
Loading…
Reference in a new issue