Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Customize Assignment Behavior with a Proxy Handler


    Proxies allow you to hijack the default process of assigning a value to a property on an object. Create a Proxy and link the object you want to proxy to the handler then you can define the behavior inside of a set function on the handler. The simplest example is to create a logging behavior which would log out the previous and next values before the value has changed.