Proxy

suggest change

Versions

[{“Name”:“6”,“GroupName”:null},{“Name”:“7”,“GroupName”:null},{“Name”:“8”,“GroupName”:null}]

Introduction

A Proxy in JavaScript can be used to modify fundamental operations on objects. Proxies were introduced in ES6. A Proxy on an object is itself an object, that has traps. Traps may be triggered when operations are performed on the Proxy. This includes property lookup, function calling, modifying properties, adding properties, et cetera. When no applicable trap is defined, the operation is performed on the proxied object as if there was no Proxy.

Syntax

Parameters

|Parameter|Details| |———|—––| |target | The target object, actions on this object (getting, setting, etc…) will be routed trough the handler | |handler | An object that can define “traps” for intercepting actions on the target object (getting, setting, etc…) |

Remarks

A full list of available “traps” can be found on MDN - Proxy - “Methods of the handler object”.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Proxy:
* Proxy

Table Of Contents
11 Arrays
12 Objects
14 Classes
16 Map
17 Set
24 Loops
27 Date
29 Scope
30 AJAX
35 Cookies
41 JSON
44 Fetch
45 Modules
46 Screen
64 Console
68 Symbols
73 Modals
76 Events
86 Proxy
89 WeakMap
90 WeakSet
102 Tilde