IWebViewControl IWebViewControl IWebViewControl IWebViewControl IWebViewControl Interface

Definition

Provides a control that hosts HTML content in an app.

public : interface IWebViewControl
struct winrt::Windows::Web::UI::IWebViewControl
public interface IWebViewControl
Public Interface IWebViewControl
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Attributes

Windows 10 requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Properties

CanGoBack CanGoBack CanGoBack CanGoBack CanGoBack

Gets a value that indicates whether there is at least one page in the backward navigation history.

CanGoForward CanGoForward CanGoForward CanGoForward CanGoForward

Gets a value that indicates whether there is at least one page in the forward navigation history.

ContainsFullScreenElement ContainsFullScreenElement ContainsFullScreenElement ContainsFullScreenElement ContainsFullScreenElement

Gets a value that indicates whether the IWebViewControl contains an element that supports full screen.

DefaultBackgroundColor DefaultBackgroundColor DefaultBackgroundColor DefaultBackgroundColor DefaultBackgroundColor

Gets or sets the color to use as the IWebViewControl background when the HTML content does not specify a color.

DeferredPermissionRequests DeferredPermissionRequests DeferredPermissionRequests DeferredPermissionRequests DeferredPermissionRequests

Gets a collection of permission requests that are waiting to be granted or denied.

DocumentTitle DocumentTitle DocumentTitle DocumentTitle DocumentTitle

Gets the title of the page currently displayed in the IWebViewControl.

Settings Settings Settings Settings Settings

Gets a WebViewControlSettings object that contains properties to enable or disable IWebViewControl features.

Source Source Source Source Source

Gets or sets the Uniform Resource Identifier (URI) source of the HTML content to display in the IWebViewControl.

Methods

BuildLocalStreamUri(String, String) BuildLocalStreamUri(String, String) BuildLocalStreamUri(String, String) BuildLocalStreamUri(String, String) BuildLocalStreamUri(String, String)

Creates a URI that you can pass to NavigateToLocalStreamUri

CapturePreviewToStreamAsync(IRandomAccessStream) CapturePreviewToStreamAsync(IRandomAccessStream) CapturePreviewToStreamAsync(IRandomAccessStream) CapturePreviewToStreamAsync(IRandomAccessStream) CapturePreviewToStreamAsync(IRandomAccessStream)

Creates an image of the current IWebViewControl contents and writes it to the specified stream.

CaptureSelectedContentToDataPackageAsync() CaptureSelectedContentToDataPackageAsync() CaptureSelectedContentToDataPackageAsync() CaptureSelectedContentToDataPackageAsync() CaptureSelectedContentToDataPackageAsync()

Asynchronously gets a DataPackage that contains the selected content within the IWebViewControl.

GetDeferredPermissionRequestById(UInt32, WebViewControlDeferredPermissionRequest) GetDeferredPermissionRequestById(UInt32, WebViewControlDeferredPermissionRequest) GetDeferredPermissionRequestById(UInt32, WebViewControlDeferredPermissionRequest) GetDeferredPermissionRequestById(UInt32, WebViewControlDeferredPermissionRequest) GetDeferredPermissionRequestById(UInt32, WebViewControlDeferredPermissionRequest)

Returns the deferred permission request with the specified Id.

GoBack() GoBack() GoBack() GoBack() GoBack()

Navigates the IWebViewControl to the previous page in the navigation history.

GoForward() GoForward() GoForward() GoForward() GoForward()

Navigates the IWebViewControl to the next page in the navigation history.

InvokeScriptAsync(String, IIterable<String>) InvokeScriptAsync(String, IIterable<String>) InvokeScriptAsync(String, IIterable<String>) InvokeScriptAsync(String, IIterable<String>) InvokeScriptAsync(String, IIterable<String>)

Executes the specified script function from the currently loaded HTML, with specific arguments, as an asynchronous action.

Navigate(Uri) Navigate(Uri) Navigate(Uri) Navigate(Uri) Navigate(Uri)

Loads the HTML content at the specified Uniform Resource Identifier (URI).

NavigateToLocalStreamUri(Uri, IUriToStreamResolver) NavigateToLocalStreamUri(Uri, IUriToStreamResolver) NavigateToLocalStreamUri(Uri, IUriToStreamResolver) NavigateToLocalStreamUri(Uri, IUriToStreamResolver) NavigateToLocalStreamUri(Uri, IUriToStreamResolver)

Loads local web content at the specified URI using an IUriToStreamResolver.

NavigateToString(String) NavigateToString(String) NavigateToString(String) NavigateToString(String) NavigateToString(String)

Loads the specified HTML content as a new document.

NavigateWithHttpRequestMessage(HttpRequestMessage) NavigateWithHttpRequestMessage(HttpRequestMessage) NavigateWithHttpRequestMessage(HttpRequestMessage) NavigateWithHttpRequestMessage(HttpRequestMessage) NavigateWithHttpRequestMessage(HttpRequestMessage)

Navigates the IWebViewControl to a URI with a POST request and HTTP headers.

Refresh() Refresh() Refresh() Refresh() Refresh()

Reloads the current content in the IWebViewControl.

Stop() Stop() Stop() Stop() Stop()

Halts the current IWebViewControl navigation or download.

Events

ContainsFullScreenElementChanged ContainsFullScreenElementChanged ContainsFullScreenElementChanged ContainsFullScreenElementChanged ContainsFullScreenElementChanged

Occurs when the status of whether the IWebViewControl currently contains a full screen element or not changes.

ContentLoading ContentLoading ContentLoading ContentLoading ContentLoading

Occurs when the IWebViewControl has started loading new content.

DOMContentLoaded DOMContentLoaded DOMContentLoaded DOMContentLoaded DOMContentLoaded

Occurs when the IWebViewControl has finished parsing the current HTML content.

FrameContentLoading FrameContentLoading FrameContentLoading FrameContentLoading FrameContentLoading

Occurs when a frame in the IWebViewControl has finished parsing its current HTML content.

FrameDOMContentLoaded FrameDOMContentLoaded FrameDOMContentLoaded FrameDOMContentLoaded FrameDOMContentLoaded

Occurs when a frame in the IWebViewControl has finished parsing its current HTML content.

FrameNavigationCompleted FrameNavigationCompleted FrameNavigationCompleted FrameNavigationCompleted FrameNavigationCompleted

Occurs when a frame in the IWebViewControl has finished loading its content.

FrameNavigationStarting FrameNavigationStarting FrameNavigationStarting FrameNavigationStarting FrameNavigationStarting

Occurs before a frame in the IWebViewControl navigates to new content.

LongRunningScriptDetected LongRunningScriptDetected LongRunningScriptDetected LongRunningScriptDetected LongRunningScriptDetected

Occurs periodically while the IWebViewControl executes JavaScript, letting you halt the script.

NavigationCompleted NavigationCompleted NavigationCompleted NavigationCompleted NavigationCompleted

Occurs when the IWebViewControl has finished loading the current content or if navigation has failed.

NavigationStarting NavigationStarting NavigationStarting NavigationStarting NavigationStarting

Occurs before the IWebViewControl navigates to new content.

NewWindowRequested NewWindowRequested NewWindowRequested NewWindowRequested NewWindowRequested

Occurs when a user performs an action in the IWebViewControl that causes content to be opened in a new window.

PermissionRequested PermissionRequested PermissionRequested PermissionRequested PermissionRequested

Occurs when an action in an IWebViewControl requires that permission be granted.

ScriptNotify ScriptNotify ScriptNotify ScriptNotify ScriptNotify

Occurs when the content contained in the IWebViewControl passes a string to the application by using JavaScript.

UnsafeContentWarningDisplaying UnsafeContentWarningDisplaying UnsafeContentWarningDisplaying UnsafeContentWarningDisplaying UnsafeContentWarningDisplaying

Occurs when the IWebViewControl shows a warning page for content that was reported as unsafe by SmartScreen Filter.

UnsupportedUriSchemeIdentified UnsupportedUriSchemeIdentified UnsupportedUriSchemeIdentified UnsupportedUriSchemeIdentified UnsupportedUriSchemeIdentified

Occurs when an attempt is made to navigate to a Uniform Resource Identifier (URI) using a scheme that IWebViewControl doesn't support.

UnviewableContentIdentified UnviewableContentIdentified UnviewableContentIdentified UnviewableContentIdentified UnviewableContentIdentified

Occurs when the IWebViewControl attempts to download an unsupported file.

WebResourceRequested WebResourceRequested WebResourceRequested WebResourceRequested WebResourceRequested

Allows the interception of an HTTP request. This event is triggered every time an HTTP request is made.