GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — JavaScript Proxy/Handler - GeeksforGeeks JavaScript Proxy/HandlerLast Updated : 23 Jul, 2025 JavaScript Proxy is an object which intercepts another object and resists the fundamental operations on it. This object is mostly used when we want to hide information about one object from unauthorized access. A Proxy consists of two parts which are its target and handler. A target is a JavaScript object on which the proxy is applied and the handler object contains the function to intercept any other operation on it. Syntax: const prox = new Proxy(tar, handle) Parameters: This object accepts two parameters.
Returns: A proxy object. Example 1: Here the method applies a Proxy object with an empty handler.
Output: Raj
DSAExample 2: Here the method applies a handler function to intercept calls on the target object.
Output: unauthorized
unauthorizedExample 3: Here the method traps calls on the target object based on the condition.
Output: Raj
undefinedExample 4: This example uses Proxy methods to delete properties.
Output: DSA
Removed: name
undefinedSupported Browsers:
We have a complete list of JavaScript Proxy methods, to check please go through JavaScript Proxy/handler Reference article. Comment Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |