2018-08-16 20:33:53 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <React/RCTView.h>
|
|
|
|
|
|
|
|
@class RCTWKWebView;
|
|
|
|
|
|
|
|
@protocol RCTWKWebViewDelegate <NSObject>
|
2018-08-16 20:34:16 +00:00
|
|
|
|
|
|
|
- (BOOL)webView:(RCTWKWebView *)webView
|
|
|
|
shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
|
|
|
|
withCallback:(RCTDirectEventBlock)callback;
|
|
|
|
|
2018-08-16 20:33:53 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface RCTWKWebView : RCTView
|
|
|
|
|
|
|
|
@property (nonatomic, weak) id<RCTWKWebViewDelegate> delegate;
|
|
|
|
@property (nonatomic, copy) NSDictionary *source;
|
2018-08-16 20:33:58 +00:00
|
|
|
@property (nonatomic, assign) BOOL messagingEnabled;
|
2018-08-16 20:33:55 +00:00
|
|
|
@property (nonatomic, copy) NSString *injectedJavaScript;
|
2018-08-16 20:34:05 +00:00
|
|
|
@property (nonatomic, assign) BOOL scrollEnabled;
|
2018-08-16 20:34:07 +00:00
|
|
|
@property (nonatomic, assign) CGFloat decelerationRate;
|
2018-08-16 20:34:18 +00:00
|
|
|
@property (nonatomic, assign) BOOL allowsInlineMediaPlayback;
|
|
|
|
@property (nonatomic, assign) BOOL bounces;
|
2018-08-16 20:33:53 +00:00
|
|
|
|
2018-08-16 20:33:58 +00:00
|
|
|
- (void)postMessage:(NSString *)message;
|
2018-08-16 20:34:09 +00:00
|
|
|
- (void)injectJavaScript:(NSString *)script;
|
2018-08-16 20:34:11 +00:00
|
|
|
- (void)goForward;
|
|
|
|
- (void)goBack;
|
2018-08-16 20:34:14 +00:00
|
|
|
- (void)reload;
|
|
|
|
- (void)stopLoading;
|
2018-08-16 20:33:58 +00:00
|
|
|
|
2018-08-16 20:33:53 +00:00
|
|
|
@end
|