WKUserScript forMainFrameOnly
问题 WKUserScript has this init init(source: String, injectionTime: WKUserScriptInjectionTime, forMainFrameOnly: Bool ) Simply what is meant by 'MainFrame' ? 回答1: WebView is the core view class in the WebKit framework that manages interactions between the WebFrame and WebFrameView classes.WebFrame objects encapsulate the content contained in a single frame element. A hierarchy of WebFrame objects is used to model an entire webpage where the root is called the main frame . There is a WebFrameView