Share via


WebViewManager Class

Definition

Manages activities within a web view that hosts Razor components. Platform authors should subclass this to wire up the abstract and protected methods to the APIs of the platform's web view.

public abstract class WebViewManager : IAsyncDisposable
type WebViewManager = class
    interface IAsyncDisposable
Public MustInherit Class WebViewManager
Implements IAsyncDisposable
Inheritance
WebViewManager
Implements

Constructors

WebViewManager(IServiceProvider, Dispatcher, Uri, IFileProvider, JSComponentConfigurationStore, String)

Constructs an instance of WebViewManager.

Properties

Dispatcher

Gets the Dispatcher used by this WebViewManager instance.

Methods

AddRootComponentAsync(Type, String, ParameterView)

Adds a root component to the attached page.

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

DisposeAsyncCore()

Disposes the current WebViewManager instance.

MessageReceived(Uri, String)

Notifies the WebViewManager about a message from JavaScript running within the web view.

Navigate(String)

Instructs the web view to navigate to the specified location, bypassing any client-side routing.

NavigateCore(Uri)

Instructs the web view to navigate to the specified location, bypassing any client-side routing.

RemoveRootComponentAsync(String)

Removes a previously-attached root component from the current page.

SendMessage(String)

Sends a message to JavaScript code running in the attached web view. This must be forwarded to the Blazor JavaScript code.

TryDispatchAsync(Action<IServiceProvider>)

Calls the specified workItem asynchronously and passes in the scoped services available to Razor components. This method will not throw any exceptions if it is unable to call the specified workItem, but if it does call it, then exceptions may still be thrown by the workItem itself.

TryGetResponseContent(String, Boolean, Int32, String, Stream, IDictionary<String,String>)

Tries to provide the response content for a given network request.

Applies to