projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
238d4ad
)
Make getUrl work for devToolsWebContents
author
Cheng Zhao
<zcbenz@gmail.com>
Tue, 15 Sep 2015 01:20:56 +0000
(09:20 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Tue, 15 Sep 2015 01:20:56 +0000
(09:20 +0800)
atom/browser/api/lib/navigation-controller.coffee
patch
|
blob
|
history
diff --git
a/atom/browser/api/lib/navigation-controller.coffee
b/atom/browser/api/lib/navigation-controller.coffee
index
a985931
..
f78d92c
100644
(file)
--- a/
atom/browser/api/lib/navigation-controller.coffee
+++ b/
atom/browser/api/lib/navigation-controller.coffee
@@
-16,6
+16,11
@@
class NavigationController
constructor: (@webContents) ->
@clearHistory()
+ # webContents may have already navigated to a page.
+ if @webContents._getUrl()
+ @currentIndex++
+ @history.push @webContents._getUrl()
+
@webContents.on 'navigation-entry-commited', (event, url, inPage, replaceEntry) =>
if @inPageIndex > -1 and not inPage
# Navigated to a new page, clear in-page mark.