Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WebUIBackgroundTaskInstanceRuntimeClass.canceled event

Applies to Windows and Windows Phone

Attaches a cancellation event handler to the background task instance.

Syntax


function onCanceled(eventArgs) { /* Your code */ }
 
// addEventListener syntax
webUIBackgroundTaskInstanceRuntimeClass.addEventListener("canceled", onCanceled);
webUIBackgroundTaskInstanceRuntimeClass.removeEventListener("canceled", onCanceled);
 
- or -

webUIBackgroundTaskInstanceRuntimeClass.oncanceled = onCanceled;


Event information

Delegate BackgroundTaskCanceledEventHandler

Remarks

In most cases, JavaScript background tasks continue to run until the Web Workers close method is called. The system shuts down a background task only when all apps are being closed, for example user log off or system shut down. In that case, Windows fires the canceled event, enabling the background task to complete any final activity before it is closed.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.WebUI

Metadata

Windows.winmd

See also

WebUIBackgroundTaskInstanceRuntimeClass

 

 

Show:
© 2014 Microsoft