Freigeben über


Asynchronous programming for Windows Store apps written in JavaScript

Illustration of how asynchronous promises work in Windows Stores apps written in JavaScript: Graphic: Kraig Brockschmidt

Kraig Brockschmidt has a nice intro to the async model for Windows Store apps, focusing on JavaScript: All about promises (for Windows Store apps written in JavaScript).

Here’s the kind of code you’ll be writing:

 var promise1 = someOperationAsync();
 var promise2 = promise1.then(function completedHandler1 (result1) { return 7103; } );
 promise2.then(function completedHandler2 (result2) { });

Learn more about the async model at the Windows Dev Center: Asynchronous programming (Windows Store apps).

All about promises (for Windows Store apps written in JavaScript)

Technorati Tags: asynchronous,Windows,Windows 8,JavaScript,Windows Runtime,Windows Store app