This is the bocoup web log with posts from Al, Boaz, Rick, Sam, Nate, Nick & Pete. You should also make sure to checkout code.bocoup.com, where we keep the finished versions of ideas we kick around here.


Jun 21, 2010

Javascript Web Workers: Chrome 5+ supports new SharedWorker()

In my excitement and haste upon discovering new SharedWorker() support in the Opera 10.60 Beta, I neglected to snoop around the window object of my two favorites, Chrome 5+ and FireFox 3.6+ … WHOOPS! If I had done so, I would’ve discovered, as I did just now, that Chrome 5+ ALSO supports new SharedWorker(). Of course, then I have to test Safari 5 – and yes, it too supports new SharedWorker().


I modified my previous example to try it out in Chrome and Safari (mainly, I removed the call to Firebug Lite). The Gists are available for download here.


The comments will guide you through the process


The inner iframe page:


The outer page:


The renderer (client side):


The worker:


That leaves two browsers to add support… I’m looking at you Firefox 4. IE9 almost isn’t worth mentioning, because while I’m optimistic that it will support new Worker() (because the first preview announcement said it would) – I doubt we’ll get support for new SharedWorker() in the same release. Prove me wrong.



Comments:

One Trackback

  1. [...] This post was mentioned on Twitter by Alistair MacDonald and rick waldron, Boaz Sender. Boaz Sender said: RT @rwaldron: Whoops! Chrome 5, Safari 5 ALSO support new SharedWorker() http://gul.ly/7q #javascript #chrome #webworkers #html5 [...]




Please send your questions to this address or call Bocoup at 617-379-2752
This web page is proudly maintained by Bocoup and hosted by (mt) Media Temple
All code on this website is Open Source