Various fixes of #801

This commit is contained in:
Cheng Zhao 2014-11-12 10:28:50 +08:00
parent 993c52dcd5
commit fbd74c0e2d
5 changed files with 24 additions and 29 deletions

View file

@ -26,12 +26,10 @@ module.exports.wrap = (webContents) ->
webContents.getId = -> "#{@getProcessId()}-#{@getRoutingId()}"
webContents.equal = (other) -> @getId() is other.getId()
# Provide a default parameter for urlOptions to be compatible with the old
# API.
webContents::loadUrl = (url, urlOptions={}) -> loadUrl url, urlOptions
webContents::reload = (urlOptions={}) -> reload(urlOptions)
webContents::reloadIgnoringCache = (urlOptions={}) ->
reloadIgnoringCache(urlOptions)
# Provide a default parameter for |urlOptions|.
webContents.loadUrl = (url, urlOptions={}) -> @_loadUrl url, urlOptions
webContents.reload = (urlOptions={}) -> @_reload urlOptions
webContents.reloadIgnoringCache = (urlOptions={}) -> @_reloadIgnoringCache urlOptions
# Translate |disposition| to string for 'new-window' event.
webContents.on '-new-window', (args..., disposition) ->