mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-02 17:47:21 +08:00
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 https://github.com/facebook/react-native/pull/15554 Differential Revision: D5665979 Pulled By: hramos fbshipit-source-id: a52e473bc5691a6e180f45f0728e4ad89a7d354f
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.