Replace "Url" in API names with "URL"

This commit is contained in:
Cheng Zhao 2015-11-13 16:03:40 +08:00
parent 8f56387bd9
commit fbb8e61958
57 changed files with 251 additions and 212 deletions

View file

@ -1,5 +1,5 @@
{EventEmitter} = require 'events'
{ipcMain, NavigationController, Menu} = require 'electron'
{deprecate, ipcMain, NavigationController, Menu} = require 'electron'
binding = process.atomBinding 'web_contents'
@ -45,7 +45,7 @@ wrapWebContents = (webContents) ->
# Make sure webContents.executeJavaScript would run the code only when the
# web contents has been loaded.
webContents.executeJavaScript = (code, hasUserGesture=false) ->
if @getUrl() and not @isLoading()
if @getURL() and not @isLoading()
@_executeJavaScript code, hasUserGesture
else
webContents.once 'did-finish-load', @_executeJavaScript.bind(this, code, hasUserGesture)
@ -70,6 +70,10 @@ wrapWebContents = (webContents) ->
menu = Menu.buildFromTemplate params.menu
menu.popup params.x, params.y
# Deprecated.
deprecate.rename webContents, 'loadUrl', 'loadURL'
deprecate.rename webContents, 'getUrl', 'getURL'
webContents.printToPDF = (options, callback) ->
printingSetting =
pageRage: []