Deprecate the page-title-set event

We have two names for the same event, page-title-updated wins.
This commit is contained in:
Cheng Zhao 2015-12-01 18:50:56 +08:00
parent c95117fb22
commit e5974e44ed
6 changed files with 24 additions and 18 deletions

View file

@ -76,13 +76,15 @@ wrapWebContents = (webContents) ->
# until next tick.
setImmediate => @emit 'did-fail-load', args...
# Delays the page-title-set event to next tick.
webContents.on '-page-title-set', (args...) ->
setImmediate => @emit 'page-title-set', args...
# Delays the page-title-updated event to next tick.
webContents.on '-page-title-updated', (args...) ->
setImmediate => @emit 'page-title-updated', args...
# Deprecated.
deprecate.rename webContents, 'loadUrl', 'loadURL'
deprecate.rename webContents, 'getUrl', 'getURL'
deprecate.event webContents, 'page-title-set', 'page-title-updated', (args...) ->
@emit 'page-title-set', args...
webContents.printToPDF = (options, callback) ->
printingSetting =