2018-09-08 21:17:19 +00:00
|
|
|
#import <React/RCTView.h>
|
|
|
|
|
2018-09-08 21:50:13 +00:00
|
|
|
@class RCTUIWebView;
|
2018-09-08 21:17:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Special scheme used to pass messages to the injectedJavaScript
|
|
|
|
* code without triggering a page load. Usage:
|
|
|
|
*
|
|
|
|
* window.location.href = RNCJSNavigationScheme + '://hello'
|
|
|
|
*/
|
|
|
|
extern NSString *const RNCJSNavigationScheme;
|
|
|
|
|
2018-09-08 21:50:13 +00:00
|
|
|
@protocol RCTUIWebViewDelegate <NSObject>
|
2018-09-08 21:17:19 +00:00
|
|
|
|
2018-09-08 21:50:13 +00:00
|
|
|
- (BOOL)webView:(RCTUIWebView *)webView
|
2018-09-08 21:17:19 +00:00
|
|
|
shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
|
|
|
|
withCallback:(RCTDirectEventBlock)callback;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2018-09-08 21:50:13 +00:00
|
|
|
@interface RCTUIWebView : RCTView
|
2018-09-08 21:17:19 +00:00
|
|
|
|
2018-09-08 21:50:13 +00:00
|
|
|
@property (nonatomic, weak) id<RCTUIWebViewDelegate> delegate;
|
2018-09-08 21:17:19 +00:00
|
|
|
|
|
|
|
@property (nonatomic, copy) NSDictionary *source;
|
|
|
|
@property (nonatomic, assign) UIEdgeInsets contentInset;
|
|
|
|
@property (nonatomic, assign) BOOL automaticallyAdjustContentInsets;
|
|
|
|
@property (nonatomic, assign) BOOL messagingEnabled;
|
|
|
|
@property (nonatomic, copy) NSString *injectedJavaScript;
|
|
|
|
@property (nonatomic, assign) BOOL scalesPageToFit;
|
|
|
|
|
|
|
|
- (void)goForward;
|
|
|
|
- (void)goBack;
|
|
|
|
- (void)reload;
|
|
|
|
- (void)stopLoading;
|
|
|
|
- (void)postMessage:(NSString *)message;
|
|
|
|
- (void)injectJavaScript:(NSString *)script;
|
|
|
|
|
|
|
|
@end
|