2018-09-08 04:11:49 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <React/RCTView.h>
|
|
|
|
#import <React/RCTDefines.h>
|
|
|
|
#import <WebKit/WebKit.h>
|
|
|
|
|
2018-09-18 16:32:16 +00:00
|
|
|
@class RNCWKWebView;
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2018-09-18 16:32:16 +00:00
|
|
|
@protocol RNCWKWebViewDelegate <NSObject>
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2018-09-18 16:32:16 +00:00
|
|
|
- (BOOL)webView:(RNCWKWebView *)webView
|
2019-01-07 14:19:32 +00:00
|
|
|
shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
|
2018-09-08 04:11:49 +00:00
|
|
|
withCallback:(RCTDirectEventBlock)callback;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2018-09-18 16:32:16 +00:00
|
|
|
@interface RNCWKWebView : RCTView
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2018-09-18 16:32:16 +00:00
|
|
|
@property (nonatomic, weak) id<RNCWKWebViewDelegate> delegate;
|
2018-09-08 04:11:49 +00:00
|
|
|
@property (nonatomic, copy) NSDictionary *source;
|
|
|
|
@property (nonatomic, assign) BOOL messagingEnabled;
|
|
|
|
@property (nonatomic, copy) NSString *injectedJavaScript;
|
|
|
|
@property (nonatomic, assign) BOOL scrollEnabled;
|
2018-11-22 12:58:07 +00:00
|
|
|
@property (nonatomic, assign) BOOL pagingEnabled;
|
2018-09-08 04:11:49 +00:00
|
|
|
@property (nonatomic, assign) CGFloat decelerationRate;
|
|
|
|
@property (nonatomic, assign) BOOL allowsInlineMediaPlayback;
|
|
|
|
@property (nonatomic, assign) BOOL bounces;
|
|
|
|
@property (nonatomic, assign) BOOL mediaPlaybackRequiresUserAction;
|
|
|
|
#if WEBKIT_IOS_10_APIS_AVAILABLE
|
|
|
|
@property (nonatomic, assign) WKDataDetectorTypes dataDetectorTypes;
|
|
|
|
#endif
|
|
|
|
@property (nonatomic, assign) UIEdgeInsets contentInset;
|
|
|
|
@property (nonatomic, assign) BOOL automaticallyAdjustContentInsets;
|
2018-10-17 14:59:19 +00:00
|
|
|
@property (nonatomic, assign) BOOL hideKeyboardAccessoryView;
|
2018-10-21 21:12:59 +00:00
|
|
|
@property (nonatomic, assign) BOOL allowsBackForwardNavigationGestures;
|
2019-01-11 13:59:03 +00:00
|
|
|
@property (nonatomic, assign) BOOL incognito;
|
2019-01-07 14:19:32 +00:00
|
|
|
@property (nonatomic, assign) BOOL useSharedProcessPool;
|
2018-11-19 10:13:31 +00:00
|
|
|
@property (nonatomic, copy) NSString *userAgent;
|
2019-01-30 09:32:46 +00:00
|
|
|
@property (nonatomic, assign) BOOL cacheEnabled;
|
2018-11-25 10:17:28 +00:00
|
|
|
@property (nonatomic, assign) BOOL allowsLinkPreview;
|
2019-02-12 13:47:24 +00:00
|
|
|
@property (nonatomic, assign) BOOL showsHorizontalScrollIndicator;
|
|
|
|
@property (nonatomic, assign) BOOL showsVerticalScrollIndicator;
|
2019-03-07 09:27:29 +00:00
|
|
|
@property (nonatomic, assign) BOOL directionalLockEnabled;
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2019-02-12 09:35:14 +00:00
|
|
|
+ (void)setClientAuthenticationCredential:(nullable NSURLCredential*)credential;
|
2018-09-08 04:11:49 +00:00
|
|
|
- (void)postMessage:(NSString *)message;
|
|
|
|
- (void)injectJavaScript:(NSString *)script;
|
|
|
|
- (void)goForward;
|
|
|
|
- (void)goBack;
|
|
|
|
- (void)reload;
|
|
|
|
- (void)stopLoading;
|
|
|
|
|
|
|
|
@end
|