16 The manifest names this the “Start page,” but I prefer “home page” to avoid confusion with the Windows Start screen.
17 If the color scheme looks odd, it’s because the iframe is picking up styles from the default ui-dark.css of WinJS. Try changing that stylesheet to ui-light.css for something that looks more typical.
18 A number of samples in the Windows SDK use then instead of done, especially for single async operations. This came from the fact that done didn’t yet exist at one point, and those samples weren’t always updated.
19 For readers who are seriously into logging, beyond the kind you do with chainsaws, check out the WinJS.Utilities functions startLog, stopLog, and formatLog
, which provide additional functionality on top of console.log. I’ll leave you to commune with the documentation for these but wanted to bring them to your awareness.
20 If you can’t find Event Viewer, press the Windows key to go to the Start page and then invoke the Settings charm. Select Tiles, and turn on Show Administrative Tools. You’ll then see a tile for Event Viewer on your Start page.
21 There is also WinJS.Utilities.ready through which you can specifically set a callback for DOMContentLoaded. This is used within WinJS, in fact, to guarantee that any call to WinJS.UI.processAll is processed after DOMContentLoaded.
22 WinRT has a specific API for dealing with RSS feeds in Windows.Web.Syndication, which we’ll see in Chapter 14. You can use this if you want a more structured means of dealing with such data sources. As it is, JavaScript has intrinsic APIs to work with XML, so it’s really your choice. In a case like this, the syndication API along with Windows.Web.AtomPub and Windows.Data.Xml are very much needed by Windows 8 apps written in other languages that don’t have the same built-in features as JavaScript.
23 If you are at all familiar with user controls in XAML, this is the same idea.
24 The beforenavigate event can be used to cancel the navigation, if necessary. Either call args.preventDefault (args being the event object), return true, or call args.setPromise where the promise returns true.
25 The Quickstart: using single-page navigation topic also shows a clever way to hijack HTML hyperlinks and hook them into WinJS.Navigation.navigate. This can be a useful tool, especially if you’re importing code from a web app.
26 If you want to impress your friends while reading the documentation, know that if an async function shows it returns a value of type IAsync[Action | Operation]WithProgress, then it will utilize a progress function given to a promise. If it only lists IAsync[Action | Operation], progress is not supported. You can learn more about this in Chapter 16.
27 Async operations from WinRT that get wrapped in promises do not fire this error event, which is why you typically use an error handler instead.