I'm just fiddling around trying to understand how his is supposed to work, but this scenario has me confused.
Object.defineProperty(Object.prototype, 'a', {set: function() {console.log("Set!");} });
With that method, I assume any time I create an object called a, that function should fire. It works here:
a = {};
Set!
But not when nested like this:
test = {a:{}};
Am I misunderstanding something?