Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

x-ms-webview element | x-ms-webview object

Applies to Windows and Windows Phone

Displays HTML content in an app.

Syntax


<x-ms-webview id="webview">
</x-ms-webview> 


var webview = document.createElement("x-ms-webview"); 

DOM Information

Inheritance Hierarchy

 Node
     x-ms-webview
 Element
     x-ms-webview
 HTMLElement
     x-ms-webview

Members

The x-ms-webview object has these types of members:

Events

The x-ms-webview object has these events.

EventDescription
MSWebViewContentLoading

Indicates that the HTML content is downloaded and is being loaded into the control.

MSWebViewDOMContentLoaded

Indicates that the main DOM elements have finished loading.

MSWebViewFrameContentLoading

Indicates that the HTML content downloaded and is being loaded into the <iframe> control.

MSWebViewFrameDOMContentLoaded

Indicates that the main DOM elements have finished loading in the <iframe>.

MSWebViewFrameNavigationCompleted

Indicates the navigation is complete, and all media elements are rendered in the <iframe>.

MSWebViewFrameNavigationStarting

Indicates a <iframe> within a WebView is starting to navigate.

MSWebViewNavigationCompleted

Indicates the navigation is complete, and all media elements are rendered.

MSWebViewNavigationStart

Indicates the WebView is starting to navigate MSWebViewContentLoading The HTML content is downloaded and is being loaded into the control.

MSWebViewScriptNotify

Raised when a page inside the WebView element calls the window.external.notify method.

MSWebViewUnviewableContentIdentified

Raised when the WebView found the content to be not HTML.

 

Methods

The x-ms-webview object has these methods.

MethodDescription
capturePreviewToBlobAsync

Creates an image of the current WebView and write it to the specified

captureSelectedContentToDataPackageAsync

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

goBack

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

goForward

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

invokeScriptAsync

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

navigate

Loads the HTML content at the specified URI.

navigateToLocalStreamUri

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

navigateToString

Loads the specified HTML content as a new document.

navigateWithHttpRequestMessage

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

refresh

Reloads the current content in the WebView.

stop

Halts the current WebView navigation or download.

 

Properties

The x-ms-webview object has these properties.

PropertyAccess typeDescription

canGoBack

Read-only

Gets a value that indicates whether the WebView can navigate backward.

canGoForward

Read-only

Gets a value that indicates whether the WebView can navigate forward.

documentTitle

Read-only

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

height

Read/write

Gets or sets the height of the WebView.

src

Read/write

Gets or sets the URI source of the HTML content to display in the WebView control.

width

Read/write

Gets or sets the width of the WebView.

 

Remarks

When a Windows Store app using JavaScript is printed, the <x-ms-webview> tags are transformed into <iframe> tags before printing. Besides the normal difference between displaying on screen and rendered for print, CSS styles applied to <iframe> elements are then applicable to the <iframe> transformed from <x-ms-webview>.

For more information, see the HTML WebView control sample.

 

 

Show:
© 2014 Microsoft