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 7, 2010

Javascript Web Workers: Safari 5 Now Supports Complex Messages

Following the announcement of Safari 5 [ 5.0 (7533.16) ] today, I did some due diligence and ran it through the json-object, array, boolean and string Worker message cases that I had produced for testing against Chrome 5. The results are in and thankfully consistent – so not much to report here accept that – yes – Safari 5′s Web Worker API has been updated to fully support complex messages as arguments to postMessage() natively.


Nothing new, but here are the cases if you want to try them yourself:

http://gist.github.com/414901


*Edit*
In the time since this was originally published, Chrome, Safari & Opera now support complex JSON messages.



Comments:

3 Comments

  1. Posted June 7, 2010 at 7:02 pm | Permalink

    What part of the web worker implementation is resultOf testing?

  2. Rick Waldron
    Posted June 7, 2010 at 7:21 pm | Permalink

    Nothing. Not one thing. Not even kind of.

    It’s just there to look visually stimulating to my eyes.

  3. Rick Waldron
    Posted June 7, 2010 at 7:24 pm | Permalink

    See, even it’s return value alludes to its own use: ‘returned from self executing function’

    … Because a function any other way would be non-thread safe. But look on the bright side, now I’ll be able to remove that obnoxious JSON.stringify/parse code from jQuery.Hive/Pollen.




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