FWWebViewJsBridge
@interface FWWebViewJsBridge
: NSObject <WKNavigationDelegate, FWWebViewJsBridgeDelegate>
WKWebView实现Javascript桥接器
-
Undocumented
Declaration
Objective-C
+ (instancetype)bridgeForWebView:(WKWebView *)webView;
-
Undocumented
Declaration
Objective-C
+ (void)enableLogging;
-
Undocumented
Declaration
Objective-C
- (void)registerClass:(id)clazz package:(nullable NSString *)package context:(nullable __weak id)context withMapper:(nullable NSDictionary<NSString *, NSString *> * (^)(NSArray<NSString *> *methods))mapper;
-
Undocumented
Declaration
Objective-C
- (void)unregisterClass:(id)clazz package:(nullable NSString *)package withMapper:(nullable NSDictionary<NSString *, NSString *> * (^)(NSArray<NSString *> *methods))mapper;
-
Undocumented
Declaration
Objective-C
- (void)registerHandler:(NSString *)handlerName handler:(FWJsBridgeHandler)handler;
-
Undocumented
Declaration
Objective-C
- (void)removeHandler:(NSString *)handlerName;
-
Undocumented
Declaration
Objective-C
- (NSArray<NSString *> *)getRegisteredHandlers;
-
Undocumented
Declaration
Objective-C
- (void)setErrorHandler:(nullable FWJsBridgeErrorHandler)handler;
-
Undocumented
Declaration
Objective-C
- (void)setFilterHandler:(nullable FWJsBridgeFilterHandler)handler;
-
Undocumented
Declaration
Objective-C
- (void)callHandler:(NSString *)handlerName;
-
Undocumented
Declaration
Objective-C
- (void)callHandler:(NSString *)handlerName data:(nullable id)data;
-
Undocumented
Declaration
Objective-C
- (void)callHandler:(NSString *)handlerName data:(nullable id)data responseCallback:(nullable FWJsBridgeResponseCallback)responseCallback;
-
Undocumented
Declaration
Objective-C
- (void)reset;
-
Undocumented
Declaration
Objective-C
- (void)setWebViewDelegate:(nullable id)webViewDelegate;
-
Undocumented
Declaration
Objective-C
- (void)disableJavscriptAlertBoxSafetyTimeout;