Results 1 - 18 of 18

Meta programming

Starting with ECMAScript 6, JavaScript gains support for the Proxy and Reflect objects allowing you to intercept and define custom behavior for fundamental language operations (e.g. property lookup, assignment, enumeration, function invocation, etc). With the help of these two objects you are able to program at the meta level of JavaScript.
Guide JavaScript Proxy Reflect

Proxy

The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc).
ECMAScript6 JavaScript Proxy

Proxy handler

The proxy's handler object is a placeholder object which contains traps for proxies.
ECMAScript6 JavaScript Proxy

handler.apply()

The handler.apply() method is a trap for a function call.
ECMAScript6 JavaScript Method Proxy

handler.construct()

The handler.construct() method is a trap for the new operator.
ECMAScript6 JavaScript Method Proxy

handler.defineProperty()

The handler.defineProperty() method is a trap for Object.defineProperty().
ECMAScript6 JavaScript Method Proxy

handler.deleteProperty()

The handler.deleteProperty() method is a trap for the delete operator.
ECMAScript6 JavaScript Method Proxy

handler.get()

The handler.get() method is a trap for getting a property value.
ECMAScript6 JavaScript Method Proxy

handler.getOwnPropertyDescriptor()

The handler.getOwnPropertyDescriptor() method is a trap for Object.getOwnPropertyDescriptor().
ECMAScript6 JavaScript Method Proxy

handler.getPrototypeOf()

The handler.getPrototypeOf() method is a trap for the [[GetPrototypeOf]] internal method.
ECMAScript6 JavaScript Method Proxy

handler.has()

The handler.has() method is a trap for the in operator.
ECMAScript6 JavaScript Method Proxy

handler.isExtensible()

The handler.isExtensible() method is a trap for Object.isExtensible().
ECMAScript6 JavaScript Method Proxy

handler.preventExtensions()

The handler.preventExtensions() method is a trap for Object.preventExtensions().
ECMAScript6 JavaScript Method Proxy

handler.set()

The handler.set() method is a trap for setting a property value.
ECMAScript6 JavaScript Method Proxy

Proxy.revocable()

The Proxy.revocable() method is used to create a revocable Proxy object.
ECMAScript6 JavaScript Method Proxy

handler.enumerate()

The handler.enumerate() method used to be a trap for for...in statements, but has been removed from the ECMAScript standard in edition 7 and is deprecated in browsers.
ECMAScript6 JavaScript Method Obsolete Proxy

handler.setPrototypeOf()

The handler.setPrototypeOf() method is a trap for Object.setPrototypeOf().
ECMAScript6 JavaScript Method Prototype Proxy