msmvps.comblogs
http://www.agilesharp.com/Services/blog/rss.ashx?UserDomainName=yanyangtian
http://msmvps.com/blogs/jon_skeet/archive/2010/12/29/reimplementing-linq-to-objects-part-12-defaultifempty.aspx
Using jQuery from an HTML5 Web WorkerjQuery is one of the most useful frameworks out there for web development. And while most of jQuery is very much about working with the browser DOM there is also another side to it that makes doing networking real easy and that is all based around the $.ajax() and related, like the $.getJSON() , functions. Now HTML5 contains a real useful part in Web Workers for doing work that should not block the background thread. And using the XMLHttpRequest for network IO is fine in a Web Worker.
Unfortunately however working with the DOM is not ok in the Web Worker, which makes total sense, but as a result using jQuery, which has lots of DOM related code is not fine in a Web Worker. And that is a shame because using jQuery for just network IO would be much easier that the XMLHttpRequest and totally fine if it would load.
So removing the DOM code from jQuery should solve the problem right?
Enter the jQuery - No DOM Edition
It turns out Konstantin Pozin did just that with the jQuery - No DOM Edition
You can find it here or download a test version here .
Enjoy!
TheProblemSolver
DotNetEvents
作者: Leo_wl
出处: http://www.cnblogs.com/Leo_wl/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
版权信息