protected virtual void OnFrameNavigationStarting(NavigationStartingEventArgs e)
 {
     if (FrameNavigationStarting != null)
     {
         FrameNavigationStarting(this, e);
     }
 }
        private void WebView2FrameNavigationStarting(object sender, NavigationStartingEventArgs e)
        {
            bool cancel          = e.Cancel;
            bool isRedirected    = e.IsRedirected;
            bool isUserInitiated = e.IsUserInitiated;
            WebView2HttpRequestHeaderCollection requestHeaders = e.HttpHeaderCollection;
            string uri = e.Uri;

            string message =
                "{ \"kind\": \"event\", \"name\": " +
                "\"FrameNavigationStarting\", \"args\": {" +
                "\"cancel\": " + BoolToString(cancel) + ", " +
                "\"isRedirected\": " + BoolToString(isRedirected) + ", " +
                "\"isUserInitiated\": " + BoolToString(isUserInitiated) + ", " +
                "\"requestHeaders\": " + RequestHeadersToJsonString(requestHeaders) + ", " +
                "\"uri\": " + EncodeQuote(uri) + " " +
                "}" +
                WebViewPropertiesToJsonString(_eventSourceWebView2) +
                "}";

            PostEventMessage(message);
        }
예제 #3
0
 protected override void OnNavigationStarting(NavigationStartingEventArgs e)
 {
     _parentBrowser.HandleTabNavStarting(_tabId, this);
     base.OnNavigationStarting(e);
 }
 private void OnNavigationStart(object sender, NavigationStartingEventArgs e)
 {
     this.Text = "Start-Navigate" + e.uri;
 }
 private void OnNavigationStart(object sender, NavigationStartingEventArgs e)
 {
     Debug.Print("isRequested:" + e.IsRedirected);
     Debug.Print("IsuserIndended:" + e.IsUserInitiated);
     Debug.Print("Url:" + e.Uri);
 }
예제 #6
0
 private void OnWebViewFrameNavigationStarting(object sender, NavigationStartingEventArgs e)
 {
     Trace.TraceInformation("OnWebViewFrameNavigationStarting");
     //MessageBox.Show(this, "OnWebViewFrameNavigationStarting");
 }
예제 #7
0
 private void OnWebViewNavigationStart(object sender, NavigationStartingEventArgs e)
 {
     Trace.TraceInformation("OnWebViewNavigationStart: " + e.Uri);
     //MessageBox.Show(e.Uri);
 }