Beispiel #1
0
        private void WebView_ContentLoading(object sender, CoreWebView2ContentLoadingEventArgs e)
        {
            // Set sessionId
            string script = $"localStorage.setItem('sessionId', '{sessionToken}');";

            webView.ExecuteScriptAsync(script);
        }
Beispiel #2
0
 private void CoreWebView2_ContentLoading(object sender, CoreWebView2ContentLoadingEventArgs e)
 {
     if (ページが読み込まれている != null)
     {
         ページが読み込まれている(sender, new ページが読み込まれている情報(e));
     }
 }
 private void _vistaHtml_ContentLoading(object sender, CoreWebView2ContentLoadingEventArgs e)
 {
     if (this._tiempos != null)
     {
         this._tiempos.Add(new EntryOfTime
         {
             Etiqueta = "CARGA CONTENIDO",
             Mensaje  = "Se carga el contenido",
             Tiempo   = DateTime.Now
         });
     }
 }
Beispiel #4
0
 private void SingleItemBrowser_ContentLoading(object sender, CoreWebView2ContentLoadingEventArgs e)
 {
     SingleItemBrowser.CoreWebView2.ExecuteScriptAsync(
         @"var timer = null;
         function getVerticalScrollPercentage( elm ){
             var p = elm.parentNode;
             return Math.round((elm.scrollTop || p.scrollTop) / (p.scrollHeight - p.clientHeight ) * 100);
         }
         window.addEventListener('scroll', function() {
             if (timer !== null)
             {
                 clearTimeout(timer);
             }
             timer = setTimeout(function() {
                 var message = { ""ScrollPos"" : getVerticalScrollPercentage(document.body) };
                 window.chrome.webview.postMessage(message);
             }, 150);
         }, false); ");
 }
Beispiel #5
0
 private void OnContentLoagind(object sender, CoreWebView2ContentLoadingEventArgs e)
 {
     Console.WriteLine("Se ha cargado");
     if (e.IsErrorPage)
     {
         this.Text = "Error al cargar la página";
     }
     else
     {
         this.Text        = "Abriendo: " + this.WebView.CoreWebView2.DocumentTitle;
         this.LblUrl.Text = "Url: " + this.WebView.CoreWebView2.Source;
         if (new Uri(this.WebView.CoreWebView2.Source).Query != String.Empty)
         {
             this.LblBaseUrl.Text = "Base URL: " + new Uri(this.WebView.CoreWebView2.Source).AbsoluteUri.Replace(new Uri(this.WebView.CoreWebView2.Source).Query, "");
         }
         else
         {
             this.LblBaseUrl.Text = "Base URL: " + new Uri(this.WebView.CoreWebView2.Source).AbsoluteUri;
         };
         this.LblRelativeUrl.Text = "URL relativa: " + new Uri(this.WebView.CoreWebView2.Source).Query;
     }
 }
Beispiel #6
0
        private void Control_ContentLoading(object sender, CoreWebView2ContentLoadingEventArgs e)
        {
            var args = new WebViewLoadedEventArgs(Control.Source);

            Callback.OnNavigated(Widget, args);
        }
 private void WebView_ContentLoading(object sender, CoreWebView2ContentLoadingEventArgs e)
 {
 }
Beispiel #8
0
 public void ContentLoading(object sender, CoreWebView2ContentLoadingEventArgs args)
 {
     LoadingSpinner.Child = new Spinner();
     Debug.Print($"{Description} Browser: Content loading");
 }