Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #164 from fujunwei/can-go-back
Browse files Browse the repository at this point in the history
Add the interface of canGoBack in CordovaWebView
  • Loading branch information
huningxin committed Apr 27, 2015
2 parents 192d693 + f38d1c3 commit 537d977
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions framework/src/org/apache/cordova/CordovaWebView.java
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,14 @@ public void postMessage(String id, Object data) {
}
}

/**
* Gets whether this WebView has a back history item.
*
* @return true if can go back, false if we are already at top
*/
public boolean canGoBack() {
return this.getNavigationHistory().canGoBack();
}

/**
* Go to previous page in history. (We manage our own history)
Expand Down

0 comments on commit 537d977

Please sign in to comment.