Improve #1137
This commit is contained in:
parent
fac9ea3356
commit
99f6bf045f
2 changed files with 16 additions and 11 deletions
|
@ -18,7 +18,7 @@ class FakeWindow
|
|||
blur: ->
|
||||
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_METHOD', @guestId, 'blur'
|
||||
|
||||
postMessage: (message, targetOrigin) ->
|
||||
postMessage: (message, targetOrigin='*') ->
|
||||
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_POSTMESSAGE', @guestId, message, targetOrigin
|
||||
|
||||
eval: (args...) ->
|
||||
|
@ -75,8 +75,8 @@ window.prompt = ->
|
|||
throw new Error('prompt() is and will not be supported in atom-shell.')
|
||||
|
||||
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_MANAGER_WINDOW_POSTMESSAGE', (message, targetOrigin) ->
|
||||
window.postMessage(message, targetOrigin)
|
||||
ipc.on 'ATOM_SHELL_GUEST_WINDOW_POSTMESSAGE', (message, targetOrigin) ->
|
||||
window.postMessage message, targetOrigin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue