7 There is a similar function WinJS.Binding.processAll that processes data-win-bind attributes (Chapter 4), and WinJS.Resources.processAll that does resource lookup on data-win-res attributes (Chapter 17).

8 See Chapter 2 of Nicolas Zakas’s High Performance JavaScript (O’Reilly, 2010) for the performance implications of scoping.

9 If you’re following the steps in Blend yourself, the taphere.png image should be added to the project in the images folder. Right-click that folder, select Add Existing Item, and then navigate to the complete sample’s images folder and select taphere.png. That will copy it into your current project.

10 The two standard stylesheets are ui-dark.css and ui-light.css. Dark styles are recommended for apps that deal with media, where a dark background helps bring out the graphical elements. We’ll use this stylesheet because we’re doing photo capture. The light stylesheet is recommended for apps that work more with textual content.

11 On the flip side, note that Blend doesn’t automatically save files going in and out of Interactive Mode. If you make a change to the same file open in Visual Studio, switch to Blend, and reload the file, you can lose changes.

12 Note that you should replace the credentials inside the init function with your own key obtained from https://www.bingmapsportal.com/.

13 The pushpin itself is draggable, but to no effect at present. See the section “Extra Credit: Receiving Messages from the iframe” later in this chapter for how we can pick up location changes from the map.

14 The {oneTimeOnly: true} parameter indicates that the URI is not reusable and should be revoked via URL.-revokeObjectURL when it’s no longer used, as when we replace img.src with a new picture. Without this, we would leak memory with each new picture. If you’ve used URL.createObjectURL in the past, you’ll see that the second parameter is now a property bag, which aligns with the most recent W3C spec.

15 Because we’re always listening to datarequested while the app is running and add a listener only once, we don’t need to worry about calling removeEventListener. For details, see “WinRT Events and removeEventListener” in Chapter 3.