12345678910111213141516171819202122232425262728293031323334 |
- //
- // WKWebViewJavascriptBridge.h
- //
- // Created by @LokiMeyburg on 10/15/14.
- // Copyright (c) 2014 @LokiMeyburg. All rights reserved.
- //
- #if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_9 || __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_1)
- #define supportsWKWebView
- #endif
- #if defined supportsWKWebView
- #import <Foundation/Foundation.h>
- #import "WebViewJavascriptBridgeBase.h"
- #import <WebKit/WebKit.h>
- @interface WKWebViewJavascriptBridge : NSObject<WKNavigationDelegate, WebViewJavascriptBridgeBaseDelegate>
- + (instancetype)bridgeForWebView:(WKWebView*)webView;
- + (void)enableLogging;
- - (void)registerHandler:(NSString*)handlerName handler:(WVJBHandler)handler;
- - (void)removeHandler:(NSString*)handlerName;
- - (void)callHandler:(NSString*)handlerName;
- - (void)callHandler:(NSString*)handlerName data:(id)data;
- - (void)callHandler:(NSString*)handlerName data:(id)data responseCallback:(WVJBResponseCallback)responseCallback;
- - (void)reset;
- - (void)setWebViewDelegate:(id)webViewDelegate;
- - (void)disableJavscriptAlertBoxSafetyTimeout;
- @end
- #endif
|