I would like to overload the "subscription" (python term, let me know if there is a better word in JS world) operation for a specific object in JS.
Just as you can overload the __getitem__ method in python I would like to overload the access to a JS object's properties, for example to throw a custom error if some unset properties are accessed.
Eventually I would like to do the same for affectation to a property.
Is it possible ? If it is, how ?
PS : I found this which is interesting but it would have work only if I knew every properties I could try to get and it is not my case.