When using postMessage() to copy data to/from a web worker, you can post an object that\'s a class. But on the far side, the received object is just the data (ie an interface, n
Some browsers may not support patching __proto__
or, in the future, may stop supporting it.
I discovered this the hard way when my code stopped working when used in WinRT HTML applications.
The properper way (in ES5) would be to call Object.create(Constructor.prototype, obj)
(see her for more examples)