mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 12:45:37 +08:00
Implement onLoading(Start|Finish|Error) and injectedJavaScript props
Summary: @public This diff includes four very straightforward changes: 1. Whenever the WebView starts loading, the `onLoadingStart` hook should be executed. The event passed into this hook should be decorated with the `navigationType`. 1. Whenever the WebView errors out while loading, the `onLoadingError` hook should be executed. 1. Whenever the WebView finishes loading (without any errors), the `onLoadingFinish` hook should be executed. 1. The serialized JavaScript passed into the `injectedJavaScript` prop should be executed when the WebView finishes loading. After execution finishes, the `onLoadingFinish` prop should be called with the serialized completion value of this JavaScript. Reviewed By: shergin Differential Revision: D6293532 fbshipit-source-id: 21407c766f73413046823ae605afc21e85cf9db6
This commit is contained in:
committed by
Facebook Github Bot
parent
1442c265da
commit
3703927e7e
@@ -18,5 +18,6 @@
|
||||
|
||||
@property (nonatomic, weak) id<RCTWKWebViewDelegate> delegate;
|
||||
@property (nonatomic, copy) NSDictionary *source;
|
||||
@property (nonatomic, copy) NSString *injectedJavaScript;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user