onunload event

2 out of 3 rated this helpful - Rate this topic

Occurs when the application is about to be unloaded.

Syntax


WinJS.Application.addEventListener("unload", listenerName);
or
WinJS.Application.onunload = listenerName;


Event information

SynchronousNo
BubblesYes
CancelableYes

Event handler parameters

eventInfo

Type: CustomEvent

An object that contains information about the event. The detail property of this object includes the following sub-properties:

  • type: "unload"
  • setPromise: the Promise indicates that the event listener has pending asynchronous work. When the Promise is completed, the next handler will be dispatched.

Remarks

For more information about the application lifecycle, see Guidelines for managing the app lifecycle.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Namespace

WinJS.Application

Library

Base.js

 

 

Build date: 12/5/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.