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>
|
|
|
|
|
2019-08-30 10:04:32 +00:00
|
|
|
@class RNCWebView;
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2019-08-30 10:04:32 +00:00
|
|
|
@protocol RNCWebViewDelegate <NSObject>
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2019-08-30 10:04:32 +00:00
|
|
|
- (BOOL)webView:(RNCWebView *)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
|
|
|
|
|
2019-08-30 10:04:32 +00:00
|
|
|
@interface RNCWebView : RCTView
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2019-08-30 10:04:32 +00:00
|
|
|
@property (nonatomic, weak) id<RNCWebViewDelegate> 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;
|
2019-04-15 08:19:10 +00:00
|
|
|
@property (nonatomic, assign) BOOL sharedCookiesEnabled;
|
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;
|
2019-04-29 15:46:07 +00:00
|
|
|
@property (nonatomic, assign) BOOL keyboardDisplayRequiresUserAction;
|
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-05-20 22:01:22 +00:00
|
|
|
@property (nonatomic, copy) NSString *applicationNameForUserAgent;
|
2019-01-30 09:32:46 +00:00
|
|
|
@property (nonatomic, assign) BOOL cacheEnabled;
|
2019-08-29 15:09:42 +00:00
|
|
|
@property (nonatomic, assign) BOOL javaScriptEnabled;
|
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;
|
2019-08-29 14:53:09 +00:00
|
|
|
@property (nonatomic, copy) NSString *allowingReadAccessToURL;
|
2018-09-08 04:11:49 +00:00
|
|
|
|
2019-02-12 09:35:14 +00:00
|
|
|
+ (void)setClientAuthenticationCredential:(nullable NSURLCredential*)credential;
|
2019-09-21 00:44:53 +00:00
|
|
|
+ (void)setCustomCertificatesForHost:(nullable NSDictionary *)certificates;
|
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
|