WinJS.Application Namespace
Provides application-level functionality, for example activation, storage, and application events.
The WinJS.Application namespace has these types of members:
- Objects
- Methods
- Functions
- Events
Objects
Object | Description |
---|---|
The local storage of the application. |
|
The roaming storage of the application. |
|
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. |
|
The temp storage of the application. |
Methods
Method | Description |
---|---|
Informs the application object that asynchronous work is being performed, and that this event handler should not be considered complete until the promise completes. This function can be set inside the handlers for all WinJS.Application events: |
Functions
Function | Description |
---|---|
Adds an event listener for application-level events: activated, checkpoint, error, loaded, ready, settings, and unload. |
|
Queues a checkpoint event. |
|
Queues an event to be processed by the WinJS.Application event queue. |
|
Removes an event listener from the WinJS.Application object. |
|
Starts dispatching application events (the activated, checkpoint, error, loaded, ready, settings, and unload events). |
|
Stops application event processing and resets WinJS.Application to its initial state. All WinJS.Application event listeners (for the activated, checkpoint, error, loaded, ready, settings, and unload events) are removed. |
Events
Event | Description |
---|---|
Occurs when Windows Runtime activation has occurred. The name of this event is "activated" (and also "mainwindowactivated"). This event occurs after the loaded event and before the ready event. |
|
Raised when the users clicks the backbutton on a Windows Phone. |
|
Occurs when receiving PLM notification or when the checkpoint function is called. |
|
Occurs when an unhandled error has been raised. |
|
Occurs after the DOMContentLoaded event, which fires after the page has been parsed but before all the resources are loaded. This event occurs before the activated event and the ready event. |
|
Occurs when the application is ready. This event occurs after the onloaded event and the onactivated event. |
|
Occurs when the settings charm is invoked. |
|
Occurs when the application is about to be unloaded. |
Requirements
Minimum WinJS version |
WinJS 1.0 |
Namespace |
WinJS.Application |