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.

webview.buildLocalStreamUri method

Applies to Windows and Windows Phone

Creates a URI that you can pass to navigateToLocalStreamUri.

Syntax


var string = webview.buildLocalStreamUri(contentIdentifier, relativePath);

Parameters

contentIdentifier

Type: String

A unique identifier for the content the URI is referencing. This defines the root of the URI.

relativePath

Type: String

The path to the resource, relative to the root.

Return value

Type: String

The URI created by combining and normalizing the contentIdentifier and relativePath.

Examples

The following example illustrates a typical use case.



var webview = document.createElement("x-ms-webview"); //Instantiate the webview element
var localStreamUri = webview.buildLocalStreamUri(contentIdentifier, relativePath); //Create URI to pass to navigateToLocalStreamUri method
webview.navigateToLocalStreamUri(localStreamUri, streamResolver); //Load the local web content	

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

See also

webview
navigateToLocalStreamUri

 

 

Show: