WinJS.UI.HtmlControl constructor

Applies to Windows and Windows Phone

Initializes a new instance of HtmlControl to define a new page control.

Syntax


var htmlControl = new WinJS.UI.HtmlControl(element, options);

Parameters

element

Type: HTMLElement

The element that hosts the HtmlControl.

options

Type: Object

The options for configuring the page. The uri option is required in order to specify the source document for the content of the page. Other options are the ones used by the WinJS.Pages.render method.

Examples

The following code shows how to use the HtmlControl constructor.


<div id="controlDiv"></div>
<script type="text/javascript">
    var htmlControl = new WinJS.UI.HtmlControl(document.getElementById("controlDiv"), {uri: 'samplePageControl.html'});
    WinJS.UI.processAll();
</script>

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

Namespace

WinJS.UI

Library

Base.js

See also

HtmlControl

 

 

Show:
© 2014 Microsoft