diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 461a66c4b2f1..d5577c0b9ee1 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -566,7 +566,9 @@ void WebContents::DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) { if (details.is_navigation_to_different_page()) - Emit("did-navigate-to-different-page"); + Emit("did-navigate-to-different-page", params.url); + else if (details.is_in_page) + Emit("did-navigate-in-page", params.url); } void WebContents::TitleWasSet(content::NavigationEntry* entry, diff --git a/atom/browser/lib/guest-view-manager.coffee b/atom/browser/lib/guest-view-manager.coffee index 43aba8ca2df4..f070324a10cc 100644 --- a/atom/browser/lib/guest-view-manager.coffee +++ b/atom/browser/lib/guest-view-manager.coffee @@ -16,6 +16,7 @@ supportedWebViewEvents = [ 'new-window' 'will-navigate' 'did-navigate-to-different-page' + 'did-navigate-in-page' 'close' 'crashed' 'gpu-crashed' diff --git a/atom/renderer/lib/web-view/guest-view-internal.coffee b/atom/renderer/lib/web-view/guest-view-internal.coffee index 7d339d355725..4e28dd347409 100644 --- a/atom/renderer/lib/web-view/guest-view-internal.coffee +++ b/atom/renderer/lib/web-view/guest-view-internal.coffee @@ -17,7 +17,8 @@ WEB_VIEW_EVENTS = 'console-message': ['level', 'message', 'line', 'sourceId'] 'new-window': ['url', 'frameName', 'disposition', 'options'] 'will-navigate': ['url'] - 'did-navigate-to-different-page': [] + 'did-navigate-to-different-page': ['url'] + 'did-navigate-in-page': ['url'] 'close': [] 'crashed': [] 'gpu-crashed': []