Compartir a través de


WinJS.UI.HtmlControl constructor

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 WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

HtmlControl