jQuery logo

From the Windows 8 app developer blog:

If you’ve already done some web development, it’s likely you’ve used the open source JavaScript framework jQuery. And if you’ve tried building Windows Store apps using jQuery, you might have run into errors related to JavaScript runtime or dynamic content. With the upcoming release of v2.0, the jQuery team has addressed these concerns. The jQuery v2 beta now supports development in HTML5/JS for Windows Store apps. As a web developer, you can use your existing skills and assets to build awesome apps for Windows 8. You can try it with the latest jQuery 2.0 beta build now.

“The jQuery team is excited about the new environments where jQuery 2.0 can be used. HTML and JavaScript developers want to take their jQuery knowledge with them to streamline the development process wherever they work. jQuery 2.0 gives them the ability to do that in environments such as Windows 8 Store applications.” - Dave Methvin, president, jQuery Foundation

Windows Store app: a different context for JavaScript code

You might be wondering why jQuery didn’t “just work” before. All Windows Store Apps, whether written in HTML/JS, C# or C++, have native access to the Windows Runtime, so a new security model was created to help your apps run securely on the new platform. Additionally, some of the APIs that are common to the web were modified to fit their new native environment in a more meaningful way. These differences can cause issues for code that was expecting to be running in a browser. Most issues are related to dynamic content – you may have gotten “HTML1701: Unable to add dynamic content…” or exceptions “0x800c001c - JavaScript runtime error: Unable to add dynamic content...”

For more info about this model check out the Delivering reliable and trustworthy apps post. You can learn about differences between the context of a Windows Store application and a Web browser on the Windows Dev Center.

More good stuff after the jump.

Windows Store app support in jQuery version 2.0