title: JavaScript detect when new object property is created
body: <p>Imagine the following....</p>
  
  <pre><code>function MyFunctional()
  {
      this._internal = "";
  }
  
  var foo = new MyFunctional();
  foo.bar = 0;
  foo.gent = "foobar";
  </code></pre>
  
  <p>how is it possible to fire an event whenever I call <code>foo.x = y;</code>  or <code>foo['x'] = y;</code>? would it be to create a setTimeout and check against the last array of property names? that would seem kinda expensive ^^</p>
  
  <p>Thanks for reading, hopeful for an answer :D </p>