Add focus() and blur() for FakeWindow

This commit is contained in:
Cheng Zhao 2014-10-27 23:03:05 +08:00
parent 64ce44d341
commit bdad1d1753
2 changed files with 10 additions and 0 deletions

View file

@ -9,6 +9,12 @@ class FakeWindow
close: ->
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_CLOSE', @embedderId, @guestId
focus: ->
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_METHOD', @guestId, 'focus'
blur: ->
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_METHOD', @guestId, 'blur'
unless process.guestInstanceId?
# Override default window.close.
window.close = ->