[whatwg] Passing more than JSON data to workers

On 12/16/09 1:27 PM, Jan Fabry wrote:
>> function setFoo(val) { foo = val; }
>> function getFoo() { return foo; }
...
> After the second postMessage, the worker receives a new object, also a function, bound to a variable with the value 1.

What if getFoo were:

   function getFoo() { return this["foo"]; }

What if it were:

   function getFoo() { return this["fo" + "o"]; }

What about:

   var o = "o";
   function getFoo() { return this["fo" + o]; }

?

Maybe a better question is: What problem are you trying to solve?

-Boris

Received on Wednesday, 16 December 2009 13:47:46 UTC