title: Automatically call a function when accessing an object in Javascript
body: <p>I am currently on a big Javascript project with a lot of libraries.
  I would like to have some part of this project to run on separate thread. There is already something inJavascript doing that : the web workers.</p>
  
  <p>Though, the web workers can't access the <code>window</code> object, and a lot of the libraries use it. Is there a way to automatically change the call to the window object (in the libraries used for the web workers), into a message sent to the parent thread ? </p>
  
  <p>Then, the parent thread would perform the action that the worker want and send back the result to the worker.</p>
  
  <p>Is it possible to do that ? And id yes, do you have any idea how ?</p>
  
  <p>Thank you !</p>