change: fixed Xcode 14 build error
This commit is contained in:
parent
ee1b0d7ff7
commit
06f87e81c4
|
@ -10,8 +10,19 @@ import WebKit
|
|||
|
||||
public class UserScript : WKUserScript {
|
||||
var groupName: String?
|
||||
|
||||
var contentWorldWrapper: Any?
|
||||
@available(iOS 14.0, *)
|
||||
lazy var contentWorld: WKContentWorld = WKContentWorld.page
|
||||
var contentWorld: WKContentWorld {
|
||||
get {
|
||||
if let value = contentWorldWrapper as? WKContentWorld {
|
||||
return value
|
||||
}
|
||||
return .page
|
||||
}
|
||||
set { contentWorldWrapper = newValue }
|
||||
}
|
||||
|
||||
|
||||
public override init(source: String, injectionTime: WKUserScriptInjectionTime, forMainFrameOnly: Bool) {
|
||||
super.init(source: source, injectionTime: injectionTime, forMainFrameOnly: forMainFrameOnly)
|
||||
|
|
Loading…
Reference in New Issue