Aracılığıyla paylaş


WinJS.Application.sessionState object

An object used for storing app information that can be used to restore the app's state after it has been suspended and then resumed.

Data that can usefully be contained in this object includes the current navigation page or any information the user has added to the input controls on the page. You should not add information about customization (for example colors) or user-defined lists of content.

Syntax

var mySessionState = WinJS.Application.sessionState;

Members

The sessionState object does not define any members.

Remarks

Any data stored in the sessionState object is automatically serialized to disk when your app is suspended. If your app is terminated and re-launched, the sessionState object automatically repopulates the data from the last suspend.

Note that if your app crashes or is terminated prior to successfully completing the suspension of the app, the sessionState object does not repopulate data when your app is relaunched.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Application

See also

Tasks

How to handle app activation

How to suspend an app

Reference

WinJS.Application Namespace