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.

--
Simon Pieters
Opera Software

Reply via email to