Detect window.open() from UIWebView

前端 未结 2 838
独厮守ぢ
独厮守ぢ 2021-01-02 14:27

Short question: Is it possible to detect window.open() in a UIWebView using the UIWebViewDelegate or is there another way to reach thi

2条回答
  •  一生所求
    2021-01-02 14:37

    Try using this delegate methods. Hope this helps.

    - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
    - (void)webViewDidStartLoad:(UIWebView *)webView;
    

提交回复
热议问题