// Token: 0x0601587E RID: 88190 RVA: 0x0057BCF4 File Offset: 0x00579EF4
 protected override void OnShowCreatedWebView(WebUIComponent sender, ShowCreatedWebViewEventArgs e)
 {
     e.Cancel = true;
     if (e.TargetURL != null && string.Compare(e.TargetURL.Host, sender.Source.Host, true) == 0)
     {
         global::Debug.Log(string.Format("Navigating to: {0}", e.TargetURL));
         base.webUI.Source = e.TargetURL;
     }
 }
    // We do not need to handle IWebView.ShowCreatedWebView. WebUIScript handles this and
    // we can simply override OnShowCreatedWebView.
    protected override void OnShowCreatedWebView( WebUIComponent sender, ShowCreatedWebViewEventArgs e )
    {
        // Note that, if you do not override OnShowCreatedWebView,
        // IWebView.ShowCreatedWebView will be canceled by default.
        e.Cancel = true;

        // For this sample, we simply load the page to the same view,
        // if the target URL is from the same domain.
        if ( ( e.TargetURL != null ) && ( String.Compare( e.TargetURL.Host, sender.Source.Host, true ) == 0 ) )
        {
            Debug.Log( String.Format( "Navigating to: {0}", e.TargetURL ) );
            webUI.Source = e.TargetURL;
        }
    }
Exemple #3
0
 // We do not need to handle IWebView.ShowCreatedWebView. WebUIScript handles this and
 // we can simply override OnShowCreatedWebView.
 protected override void OnShowCreatedWebView( WebUIComponent sender, ShowCreatedWebViewEventArgs e )
 {
     // Bars do not contain links and do not open popups.
     e.Cancel = true;
 }