Pages

Monday, 16 July 2012

Taking a Closer Look at WinJS.xhr (XmlHttpRequest)

Yesterday, I blogged a little bit about the WinJS.xhr object. You may be wondering what that object is and what makes it so special.

WinJS is a JavaScript library that provides the “glue” that connects the HTML/JavasScript world to WinRT. Since it’s just JavaScript, we can take a look at the source code quite easily. This is a great way to learn the unobtrusive style of JavaScript that’s all the rage right now. (and makes the language less awful).

The xhr object is a WinJS wrapper around the venerable XmlHttpRequest object. We can even use Visual Studio 2012 to take a look at the JavaScript source code.

From Visual Studio 2012, find a point in your code where you reference the WinJS.xhr object, right mouse click on the xhr code, and click Go To Definition.

Taking a Closer Look at WinJS.xhr (XmlHttpRequest)


Read full article here

No comments:

Post a Comment

Web Informer Button