2018-09-07 21:11:49 -07: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 12:04:32 +02:00
|
|
|
@class RNCWebView;
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2019-08-30 12:04:32 +02:00
|
|
|
@protocol RNCWebViewDelegate <NSObject>
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2019-09-23 01:49:06 -07:00
|
|
|
- (BOOL)webView:(RNCWebView *_Nonnull)webView
|
|
|
|
shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *_Nonnull)request
|
|
|
|
withCallback:(RCTDirectEventBlock _Nonnull)callback;
|
2018-09-07 21:11:49 -07:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2019-08-30 12:04:32 +02:00
|
|
|
@interface RNCWebView : RCTView
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2019-09-23 01:49:06 -07:00
|
|
|
@property (nonatomic, weak) id<RNCWebViewDelegate> _Nullable delegate;
|
|
|
|
@property (nonatomic, copy) NSDictionary * _Nullable source;
|
2018-09-07 21:11:49 -07:00
|
|
|
@property (nonatomic, assign) BOOL messagingEnabled;
|
2019-09-23 01:49:06 -07:00
|
|
|
@property (nonatomic, copy) NSString * _Nullable injectedJavaScript;
|
2018-09-07 21:11:49 -07:00
|
|
|
@property (nonatomic, assign) BOOL scrollEnabled;
|
2019-04-15 10:19:10 +02:00
|
|
|
@property (nonatomic, assign) BOOL sharedCookiesEnabled;
|
2018-11-22 15:58:07 +03:00
|
|
|
@property (nonatomic, assign) BOOL pagingEnabled;
|
2018-09-07 21:11:49 -07: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 11:46:07 -04:00
|
|
|
@property (nonatomic, assign) BOOL keyboardDisplayRequiresUserAction;
|
2018-10-17 16:59:19 +02:00
|
|
|
@property (nonatomic, assign) BOOL hideKeyboardAccessoryView;
|
2018-10-22 06:12:59 +09:00
|
|
|
@property (nonatomic, assign) BOOL allowsBackForwardNavigationGestures;
|
2019-01-11 05:59:03 -08:00
|
|
|
@property (nonatomic, assign) BOOL incognito;
|
2019-01-08 01:19:32 +11:00
|
|
|
@property (nonatomic, assign) BOOL useSharedProcessPool;
|
2019-09-23 01:49:06 -07:00
|
|
|
@property (nonatomic, copy) NSString * _Nullable userAgent;
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable applicationNameForUserAgent;
|
2019-01-30 09:32:46 +00:00
|
|
|
@property (nonatomic, assign) BOOL cacheEnabled;
|
2019-08-30 00:09:42 +09:00
|
|
|
@property (nonatomic, assign) BOOL javaScriptEnabled;
|
2018-11-25 11:17:28 +01:00
|
|
|
@property (nonatomic, assign) BOOL allowsLinkPreview;
|
2019-02-12 07:47:24 -06:00
|
|
|
@property (nonatomic, assign) BOOL showsHorizontalScrollIndicator;
|
|
|
|
@property (nonatomic, assign) BOOL showsVerticalScrollIndicator;
|
2019-03-07 17:27:29 +08:00
|
|
|
@property (nonatomic, assign) BOOL directionalLockEnabled;
|
2019-09-23 01:49:06 -07:00
|
|
|
@property (nonatomic, copy) NSString * _Nullable allowingReadAccessToURL;
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2019-02-12 01:35:14 -08:00
|
|
|
+ (void)setClientAuthenticationCredential:(nullable NSURLCredential*)credential;
|
2019-09-20 21:44:53 -03:00
|
|
|
+ (void)setCustomCertificatesForHost:(nullable NSDictionary *)certificates;
|
2019-09-23 01:49:06 -07:00
|
|
|
- (void)postMessage:(NSString *_Nullable)message;
|
|
|
|
- (void)injectJavaScript:(NSString *_Nullable)script;
|
2018-09-07 21:11:49 -07:00
|
|
|
- (void)goForward;
|
|
|
|
- (void)goBack;
|
|
|
|
- (void)reload;
|
|
|
|
- (void)stopLoading;
|
|
|
|
|
|
|
|
@end
|