using Moli.Desktop.Plugins;
|
|
namespace Moli.Desktop.WebView;
|
|
/// <summary>Runtime wrapper around a WebView2 instance owned by one plugin surface.</summary>
|
public interface IWebViewHost : IAsyncDisposable
|
{
|
string HostId { get; }
|
PluginId PluginId { get; }
|
PluginType PluginType { get; }
|
Task InitializeAsync(WebViewHostOptions options, CancellationToken cancellationToken = default);
|
Task NavigateAsync(Uri entryUri, CancellationToken cancellationToken = default);
|
Task InjectBridgeAsync(PluginBridgeContext context, CancellationToken cancellationToken = default);
|
Task DispatchLifecycleEventAsync(string eventName, object? payload, CancellationToken cancellationToken = default);
|
Task ReloadAsync(CancellationToken cancellationToken = default);
|
}
|