forked from illusionspaces/WKJavaScriptBridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWKCommandProtocol.h
More file actions
47 lines (35 loc) · 825 Bytes
/
WKCommandProtocol.h
File metadata and controls
47 lines (35 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// WKCommandProtocol.h
// Hybrid-framework
//
// Created by Kevin on 2019/4/20.
// Copyright © 2019 王凯. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "WKMsgCommand.h"
#import "WKPluginResult.h"
NS_ASSUME_NONNULL_BEGIN
@protocol WKCommandProtocol <NSObject>
/**
native 调用 js 接口
@param result simulate data
@param callbackId callbackId
*/
- (void)sendPluginResult:(WKPluginResult *)result callbackId:(NSString*)callbackId;
/**
封装个子线程接口 执行耗时插件
@param block long running
*/
- (void)runInBackground:(void (^)(void))block;
/**
获取插件plugin的实例对象
@param pluginName 插件名称
@return 实例对象
*/
- (id)getCommandInstance:(NSString*)pluginName;
/**
刷新webView
*/
- (void)reloadWebView;
@end
NS_ASSUME_NONNULL_END