LoadingState
Shared loading lifecycle definitions for WebViewState.
+-----------+ +-------+ +---------+ +------------+
| NotReady | | Ready | | Loading | | LoadingEnd |
+-----+-----+ +---+---+ +----+----+ +------+-----+
| | | |
|----------->| | | native peer becomes available
| | | | Android/iOS: almost immediate
| | | | Desktop: after native attach completes
| | | |
| |---------->| | initial load, loadUrl, refresh,
| | | | goBack, goForward, or redirect
| | | |
| | |------------->| page finished or main-frame error
| | | |
| | | |
| | |<-------------| another navigation starts
| | | |
+-----+-----+ +---+---+ +----+----+ +------+-----+
| NotReady | | Ready | | Loading | | LoadingEnd |
+-----------+ +-------+ +---------+ +------------+State notes:
NotReady is the initial state before the native view is ready.
Ready is an initialization barrier. It means "safe to issue the first load", not "the page finished loading".
Loading is emitted while the current main-frame navigation is in progress.
LoadingEnd represents the terminal result of the current navigation, either success or failure.
After the first load begins, a WebViewState usually alternates between Loading and LoadingEnd. It does not normally return to Ready unless a brand new state instance is created.
Inheritors
Types
The current main-frame navigation is running.
The current main-frame navigation has finished.
The native WebView exists logically, but its platform view is not ready yet.
The native WebView is ready to accept the initial navigation request.