EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

WinJS.Application.sessionState object

Applies to Windows and Windows Phone

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 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.Application

Library

Base.js

See also

Tasks
How to handle app activation
How to suspend an app
Reference
WinJS.Application Namespace

 

 

Mostrar:
© 2014 Microsoft