mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 02:54:42 +00:00
3703927e7e
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
24 lines
619 B
Objective-C
24 lines
619 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import <React/RCTView.h>
|
|
|
|
@class RCTWKWebView;
|
|
|
|
@protocol RCTWKWebViewDelegate <NSObject>
|
|
@end
|
|
|
|
@interface RCTWKWebView : RCTView
|
|
|
|
@property (nonatomic, weak) id<RCTWKWebViewDelegate> delegate;
|
|
@property (nonatomic, copy) NSDictionary *source;
|
|
@property (nonatomic, copy) NSString *injectedJavaScript;
|
|
|
|
@end
|