Make send and loadUrl also supported methods of BrowserWindow.

This commit is contained in:
Cheng Zhao 2014-04-25 13:14:11 +08:00
parent 272effd470
commit 1815f8b40d

View file

@ -87,8 +87,11 @@ BrowserWindow.fromDevTools = (processId, routingId) ->
return window if devtools.processId == processId and
devtools.routingId == routingId
# Helpers.
BrowserWindow::loadUrl = -> @webContents.loadUrl.apply @webContents, arguments
BrowserWindow::send = -> @webContents.send.apply @webContents, arguments
# Be compatible with old API.
BrowserWindow::loadUrl = (url) -> @webContents.loadUrl(url)
BrowserWindow::getUrl = -> @webContents.getUrl()
BrowserWindow::reload = -> @webContents.reload()
BrowserWindow::reloadIgnoringCache = -> @webContents.reloadIgnoringCache()