var p = new Proxy(target, handler);
Parameter: The proxy object accept two parameters as mentioned above and described below:
- target: A target object (can be any sort of object including a function, class, or even another proxy) to wrap with Proxy.
- handler: An object whose properties are functions which define the behavior of the proxy when an operation is performed on it.
[object Object] John Nash
Note: The above code can be run directly in terminal provided NodeJs is installed, else run it in a HTML file by pasting the above in script tag and check the output in console of any web browser.
- Creating a Proxy Webserver in Python | Set 1
- Creating a Proxy Webserver in Python | Set 2
- jQuery | $.proxy() Method
- HTTP headers | Proxy-Authenticate
- HTTP headers | Proxy-Authorization
- What is Zed Attack Proxy?
- How to use cURL via a proxy ?
- PHP | Type Casting and Conversion of an Object to an Object of other class
- HTML | DOM Object Object
- How to select first object in object in AngularJS?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.