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>
|
|
|
|
|
2018-09-18 18:32:16 +02:00
|
|
|
@class RNCWKWebView;
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2018-09-18 18:32:16 +02:00
|
|
|
@protocol RNCWKWebViewDelegate <NSObject>
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2018-09-18 18:32:16 +02:00
|
|
|
- (BOOL)webView:(RNCWKWebView *)webView
|
2019-01-08 01:19:32 +11:00
|
|
|
shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
|
2018-09-07 21:11:49 -07:00
|
|
|
withCallback:(RCTDirectEventBlock)callback;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2018-09-18 18:32:16 +02:00
|
|
|
@interface RNCWKWebView : RCTView
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2018-09-18 18:32:16 +02:00
|
|
|
@property (nonatomic, weak) id<RNCWKWebViewDelegate> delegate;
|
2018-09-07 21:11:49 -07:00
|
|
|
@property (nonatomic, copy) NSDictionary *source;
|
|
|
|
@property (nonatomic, assign) BOOL messagingEnabled;
|
|
|
|
@property (nonatomic, copy) NSString *injectedJavaScript;
|
|
|
|
@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;
|
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;
|
2018-11-19 19:13:31 +09:00
|
|
|
@property (nonatomic, copy) NSString *userAgent;
|
2019-01-30 09:32:46 +00:00
|
|
|
@property (nonatomic, assign) BOOL cacheEnabled;
|
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;
|
2018-09-07 21:11:49 -07:00
|
|
|
|
2019-02-12 01:35:14 -08:00
|
|
|
+ (void)setClientAuthenticationCredential:(nullable NSURLCredential*)credential;
|
2018-09-07 21:11:49 -07:00
|
|
|
- (void)postMessage:(NSString *)message;
|
|
|
|
- (void)injectJavaScript:(NSString *)script;
|
|
|
|
- (void)goForward;
|
|
|
|
- (void)goBack;
|
|
|
|
- (void)reload;
|
|
|
|
- (void)stopLoading;
|
|
|
|
|
|
|
|
@end
|