Table of Contents

Interface IWebView

Namespace
Playnite.WebViews
Assembly
Playnite.SDK.dll
public interface IWebView : IDisposable
Inherited Members

Properties

IsDisposed

bool IsDisposed { get; }

Property Value

bool

LoadingChangedCallbackAsync

Func<WebViewLoadingChangedEventArgs, Task>? LoadingChangedCallbackAsync { get; set; }

Property Value

Func<WebViewLoadingChangedEventArgs, Task>

WebViewInitializedCallbackAsync

Func<WebViewInitializedEventArgs, Task>? WebViewInitializedCallbackAsync { get; set; }

Property Value

Func<WebViewInitializedEventArgs, Task>

WindowHost

Gets window host for the web view. Doesn't apply to off-screen views.

Window WindowHost { get; }

Property Value

Window

Methods

Close()

Closes view.

void Close()

DeleteCookiesAsync(string, string)

Task<int> DeleteCookiesAsync(string url, string name)

Parameters

url string
name string

Returns

Task<int>

DeleteDomainCookiesAsync(string)

Deletes all cookies from specified domain.

Task<int> DeleteDomainCookiesAsync(string domain)

Parameters

domain string

Cookie domain.

Returns

Task<int>

DeleteDomainCookiesRegex(string)

Deletes all cookies from domains matching specified regular expression.

Task<int> DeleteDomainCookiesRegex(string domainRegex)

Parameters

domainRegex string

Returns

Task<int>

EvaluateJavaScriptAsync(WebViewEvaluateJavaScriptArgs)

Task<JavaScriptEvaluationResult> EvaluateJavaScriptAsync(WebViewEvaluateJavaScriptArgs args)

Parameters

args WebViewEvaluateJavaScriptArgs

Returns

Task<JavaScriptEvaluationResult>

GetCookiesAsync()

Gets all cookies.

Task<IEnumerable<HttpCookie>> GetCookiesAsync()

Returns

Task<IEnumerable<HttpCookie>>

List of cookies.

GetCurrentAddress()

Gets current URL address.

string GetCurrentAddress()

Returns

string

URL address.

GetPageSourceAsync()

Gets document source.

Task<string> GetPageSourceAsync()

Returns

Task<string>

Document source task.

GetPageTextAsync()

Gets page text.

Task<string> GetPageTextAsync()

Returns

Task<string>

Page text.

GetUrlCookiesAsync(string, bool)

Task<IEnumerable<HttpCookie>> GetUrlCookiesAsync(string url, bool includeHttpOnly)

Parameters

url string
includeHttpOnly bool

Returns

Task<IEnumerable<HttpCookie>>

Navigate(string)

Navigates to url.

void Navigate(string url)

Parameters

url string

URL to load.

NavigateAndWaitAsync(string, TimeSpan?)

Navigates to url and wait for page to be loaded.

Task NavigateAndWaitAsync(string url, TimeSpan? timeout = null)

Parameters

url string
timeout TimeSpan?

Returns

Task

OpenAsync()

Open view.

Task OpenAsync()

Returns

Task

OpenDialogAsync()

Open view as modal dialog.

Task OpenDialogAsync()

Returns

Task

SetCookieAsync(string, HttpCookie)

Sets cookie data.

Task<bool> SetCookieAsync(string url, HttpCookie cookie)

Parameters

url string

Cookie URL.

cookie HttpCookie

Cookie data.

Returns

Task<bool>

SetCookieAsync(string, string, string, string, string, DateTime)

Sets cookie data.

Task<bool> SetCookieAsync(string url, string domain, string name, string value, string path, DateTime expires)

Parameters

url string

Cookie URL.

domain string

Cookie domain.

name string

Cookie name.

value string

Cookie value.

path string

Cookie url path.

expires DateTime

Expiration date.

Returns

Task<bool>