getDeferral method
Collapse the table of content
Expand the table of content

WebUINavigatedOperation.getDeferral method

Requests that the completion of app navigation be delayed.

Syntax


var webUINavigatedDeferral = webUINavigatedOperation.getDeferral();

Parameters

This method has no parameters.

Return value

Type: WebUINavigatedDeferral

The navigated deferral object.

Remarks

When an app navigates or reloads its top level document, the system freezes the app’s visuals until the app indicates that it is ready to display its UI. The system transitions back to the app’s live UI when the app returns from its navigated event handler. However, some apps need to start asynchronous operations to retrieve state information and set up their UI (like using fragment loading to display app pages). Apps that must complete navigation asynchronously can get a deferral object from the navigated event arguments. This object enables the app to complete navigation outside its handler. When the app acquires the deferral object, its navigation is not completed when the navigation handler returns.

An app can complete navigation after its required asynchronous operations complete and it is ready to display its UI. App navigation is delayed until the app calls the WebUINavigatedDeferral.complete method.

Note that before an app completes navigation the app will appear hung to the user. It is important for the app to complete navigation as quickly as possible.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.WebUI

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.WebUI

Metadata

Windows.winmd

See also

WebUINavigatedOperation
WebUINavigatedDeferral

 

 

Show:
© 2016 Microsoft