Proxies

Proxies are used to define the custom behavior of the fundamental operations on objects. Proxies are already available in programming languages such as C#, C++, and Java, but JavaScript has never had proxies. ES6 introduced the Proxy API, which lets us create proxies. In this chapter, we will look at proxies, their usage, and proxy traps. Due to the benefits of proxies, developers are using them increasingly and, therefore, it's important to learn about proxies in depth, with examples, which we will do in this chapter.

In this chapter, we'll cover:

  • Creating proxies using the Proxy API
  • Understanding what proxies are and how to use them
  • Intercepting various operations on the objects using traps
  • The different kinds of available traps ...

Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.