Table of Contents

Interface IWebView

Namespace
Playnite.SDK
Assembly
Playnite.SDK.dll

Describes web view object.

public interface IWebView : IDisposable
Inherited Members

Properties

CanExecuteJavascriptInMainFrame

Gets a flag that indicates if you can execute javascript in the main frame.

bool CanExecuteJavascriptInMainFrame { get; }

Property Value

bool

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()

DeleteCookies(string, string)

Deletes cookies.

void DeleteCookies(string url, string name)

Parameters

url string

Cookie URL.

name string

Cookie name.

DeleteDomainCookies(string)

Deletes all cookies from specified domain.

void DeleteDomainCookies(string domain)

Parameters

domain string

Cookie domain.

DeleteDomainCookiesRegex(string)

Deletes all cookies from domains matching specified regular expression.

void DeleteDomainCookiesRegex(string domainRegex)

Parameters

domainRegex string

EvaluateScriptAsync(string)

Evaluates JavaScript script in the browser instance.

Task<JavaScriptEvaluationResult> EvaluateScriptAsync(string script)

Parameters

script string

Returns

Task<JavaScriptEvaluationResult>

GetCookies()

Gets all cookies.

List<HttpCookie> GetCookies()

Returns

List<HttpCookie>

List of cookies.

GetCurrentAddress()

Gets current URL address.

string GetCurrentAddress()

Returns

string

URL address.

GetPageSource()

Gets document source.

string GetPageSource()

Returns

string

Document source.

GetPageSourceAsync()

Gets document source.

Task<string> GetPageSourceAsync()

Returns

Task<string>

Document source task.

GetPageText()

Gets page text.

string GetPageText()

Returns

string

Page text.

GetPageTextAsync()

Gets page text.

Task<string> GetPageTextAsync()

Returns

Task<string>

Page text.

Navigate(string)

Navigates to url.

void Navigate(string url)

Parameters

url string

URL to load.

NavigateAndWait(string)

Navigates to url and wait for page to be loaded.

void NavigateAndWait(string url)

Parameters

url string

URL to load.

Open()

Open view.

void Open()

OpenDialog()

Open view as modal dialog.

bool? OpenDialog()

Returns

bool?

SetCookies(string, HttpCookie)

Sets cookie data.

void SetCookies(string url, HttpCookie cookie)

Parameters

url string

Cookie URL.

cookie HttpCookie

Cookie data.

SetCookies(string, string, string, string, string, DateTime)

Sets cookie data.

void SetCookies(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.

Events

LoadingChanged

Occurs when web view loading changes, for example when page is loaded.

event EventHandler<WebViewLoadingChangedEventArgs> LoadingChanged

Event Type

EventHandler<WebViewLoadingChangedEventArgs>