/** Instruct the browser component to go to beginning. */ public void goHome(string unused) { Deployment.Current.Dispatcher.BeginInvoke(() => { var webview = WebViewHandler.getInstance().webView; webview.CordovaBrowser.Navigate(webview.StartPageUri); }); }
public static WebViewHandler getInstance() { if (instance == null) { instance = new WebViewHandler(); } return(instance); }
public MauiWKWebView(CGRect frame, WebViewHandler handler) : base(frame, CreateConfiguration()) { _handler = handler; BackgroundColor = UIColor.Clear; AutosizesSubviews = true; }
AWebView GetNativeWebView(WebViewHandler webViewHandler) => webViewHandler.NativeView;
string GetNativeSource(WebViewHandler webViewHandler) => GetNativeWebView(webViewHandler).Url;
public static void MapEnableZoomControls(WebViewHandler handler, WebView webView) { Platform.WebViewExtensions.UpdateEnableZoomControls(handler.PlatformView, webView); }
public static void MapMixedContentMode(WebViewHandler handler, WebView webView) { Platform.WebViewExtensions.UpdateMixedContentMode(handler.PlatformView, webView); }
AWebView GetNativeWebView(WebViewHandler webViewHandler) => webViewHandler.PlatformView;
public MauiWebViewClient(WebViewHandler handler) { _handler = handler ?? throw new ArgumentNullException("handler"); _navigationResult = WebNavigationResult.Success; }
public MauiWebViewClient(WebViewHandler handler) { _handler = handler ?? throw new ArgumentNullException("handler"); }
public MauiWebViewNavigationDelegate(WebViewHandler handler) { _handler = handler ?? throw new ArgumentNullException("handler"); }
public MauiWebChromeClient(WebViewHandler handler) { _handler = handler ?? throw new ArgumentNullException("handler"); SetContext(_handler.Context); }
public MauiWebView(WebViewHandler handler, Context context) : base(context) { _handler = handler ?? throw new ArgumentNullException("handler"); }
string GetNativeSource(WebViewHandler webViewHandler) => GetNativeWebView(webViewHandler).Url.AbsoluteString;