Please sign in to comment.
Android WebView: Only fire onLoadStart for toplevel page loads
Summary: Currently, `onLoadStart` fires for a couple of cases: 1. toplevel page loads (e.g. initial page load, clicking links) 2. loading of pages within an iframe The fact that `onLoadStart` fires for case (2) causes some problems. For example, it makes it difficult for the code that uses the WebView to know what URL the WebView is currently rendering. This is because the listener can't distinguish between the toplevel URL and the URL of an iframe. Additionally, this behavior is inconsistent with the behavior on iOS. On iOS, `onLoadStart` only fires for toplevel page loads. To fix these issues, this change deletes the `doUpdateVisitedHistory` handler so that `onLoadStart` only fires for case (1). **Test Plan** Created a test page that has an iframe and loaded it in the WebView. Verified that `onLoadStart` only fires for toplevel page loads. Adam Comella Microsoft Corp. Closes #15554 Differential Revision: D5665979 Pulled By: hramos fbshipit-source-id: a52e473bc5691a6e180f45f0728e4ad89a7d354f
- Loading branch information...
Showing with 0 additions and 11 deletions.