Skip to content

Commit

Permalink
Redirect history operations in renderer to browser
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed May 11, 2015
1 parent 4c10925 commit 4d1cd7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions atom/renderer/lib/override.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ window.confirm = (message, title='') ->
window.prompt = ->
throw new Error('prompt() is and will not be supported.')

# Forward history operations to browser.
window.history.back = ->
remote.getCurrentWebContents().goBack()
window.history.forward = ->
remote.getCurrentWebContents().goForward()

window.opener =
postMessage: (message, targetOrigin='*') ->
ipc.send 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPENER_POSTMESSAGE', message, targetOrigin
Expand Down

0 comments on commit 4d1cd7e

Please sign in to comment.