Context

public class Context : NSObject, @unchecked Sendable

JS桥接上下文

  • 自定义对象

    Declaration

    Swift

    public fileprivate(set) weak var object: AnyObject? { get }
  • 绑定WKWebView

    Declaration

    Swift

    public fileprivate(set) weak var webView: WKWebView? { get }
  • 调用方法名称

    Declaration

    Swift

    public private(set) var handlerName: String { get }
  • 调用参数

    Declaration

    Swift

    public private(set) var parameters: [String : Any] { get }
  • 完成回调

    Declaration

    Swift

    public private(set) var completion: Completion? { get }
  • 初始化方法

    Declaration

    Swift

    public init(handlerName: String, parameters: [String : Any]? = nil, completion: Completion? = nil)