Delay the page-title-set event to next tick
This commit is contained in:
parent
83ee78451a
commit
c95117fb22
2 changed files with 6 additions and 2 deletions
|
@ -520,9 +520,9 @@ void WebContents::DidNavigateMainFrame(
|
||||||
void WebContents::TitleWasSet(content::NavigationEntry* entry,
|
void WebContents::TitleWasSet(content::NavigationEntry* entry,
|
||||||
bool explicit_set) {
|
bool explicit_set) {
|
||||||
if (entry)
|
if (entry)
|
||||||
Emit("page-title-set", entry->GetTitle(), explicit_set);
|
Emit("-page-title-set", entry->GetTitle(), explicit_set);
|
||||||
else
|
else
|
||||||
Emit("page-title-set", "", explicit_set);
|
Emit("-page-title-set", "", explicit_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::DidUpdateFaviconURL(
|
void WebContents::DidUpdateFaviconURL(
|
||||||
|
|
|
@ -76,6 +76,10 @@ wrapWebContents = (webContents) ->
|
||||||
# until next tick.
|
# until next tick.
|
||||||
setImmediate => @emit 'did-fail-load', args...
|
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...
|
||||||
|
|
||||||
# Deprecated.
|
# Deprecated.
|
||||||
deprecate.rename webContents, 'loadUrl', 'loadURL'
|
deprecate.rename webContents, 'loadUrl', 'loadURL'
|
||||||
deprecate.rename webContents, 'getUrl', 'getURL'
|
deprecate.rename webContents, 'getUrl', 'getURL'
|
||||||
|
|
Loading…
Reference in a new issue