WebUIApplication.activated event

4 out of 4 rated this helpful - Rate this topic

Occurs when the app is activated.

Syntax


function onActivated(eventArgs) { /* Your code */ }
 
// addEventListener syntax
webUIApplication.addEventListener("activated", onActivated);
webUIApplication.removeEventListener("activated", onActivated);
 
- or -

webUIApplication.onactivated = onActivated;


Event information

Delegate ActivatedEventHandler

Remarks

Whenever your app is launched, the activated event is raised. This event can also be raised while your app is running if the system needs to pass the app parameters related to a new activation contract. You can use the activated event to restore the previous state of your app and to retrieve the activation parameters related to the contract for which your app is being activated. For a full list of the activation contracts and more details on their parameters see the ActivationKind enumeration. Note that you can also use the WinJS Onactivated event to handle app activation.

Note  : If your app needs to navigate the top level document for any reason you must first complete activation before attempting to do the top level navigation. If you attempt a top level navigation before activation completes your app will crash. This ensures that your app and the system are in a consistent state before the JavaScript context is torn down and recreated during the navigation.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.WebUI

Metadata

Windows.winmd

See also

Tasks
How to handle app activation
Reference
Onactivated event
WebUIApplication
Samples
App activated, resume, and suspend using the WRL sample

 

 

Build date: 12/4/2012

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