WinJS.UI.Fragments.render function

Applies to Windows and Windows Phone

Loads the contents of the specified Uniform Resource Identifier (URI) into the specified element.

Syntax


WinJS.UI.Fragments.render(href, target).done( /* Your success and error handlers */ );

Parameters

href

Type: String

The URI that contains the fragment to copy.

target

Type: HTMLElement

Optional. The element to which the fragment is appended.

Return value

Type: Promise

A promise that is fulfilled when the fragment has been loaded. If a target element isn't specified, the copied fragment is the completed value. The fragment isn't added to the cache. For a similar function where the fragment is added to the cache, see renderCopy.

Remarks

Cascading Style Sheets (CSS) and script blocks that are loaded from fragments are added to the document, and won't be removed even if the fragment is unloaded.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI.Fragments

Library

Base.js

See also

Samples
Loading HTML fragments sample (Windows)

 

 

Show:
© 2014 Microsoft