[whatwg] Example wrong in web workers

Ian Hickson ian at hixie.ch
Tue Oct 27 00:41:57 PDT 2009


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.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list