W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] Example wrong in web workers

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 27 Oct 2009 07:41:57 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0910270741500.9145@hixie.dreamhostps.com>
On Mon, 26 Oct 2009, Simon Pieters wrote:
>
> Web Workers has the following in some example (twice):
> 
> // support being used as a shared worker as well as a dedicated worker
> if (this.onmessage) // dedicated worker
>   ....
> 
> This ought to be doing something like (typeof this.onmessage != 'undefined') ,
> as the event property is presumably 'null' by the time of the test.

Fixed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 27 October 2009 00:41:57 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC