Results 1 - 16 of 16

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

Reflect

Reflect is a built-in object that provides methods for interceptable JavaScript operations. The methods are the same as those of proxy handlers. Reflect is not a function object, so it's not constructible.
ECMAScript6 JavaScript Overview Reflect

Reflect.apply()

The static Reflect.apply() method calls a target function with arguments as specified.
ECMAScript6 JavaScript Method Reflect

Reflect.construct()

The static Reflect.construct() method acts like the new operator as a function. It is equivalent to calling new target(...args).
ECMAScript6 JavaScript Method Reflect

Reflect.defineProperty()

The static Reflect.defineProperty() method is like Object.defineProperty() but returns a Boolean.
ECMAScript6 JavaScript Method Reflect

Reflect.deleteProperty()

The static Reflect.deleteProperty() method allows to delete properties. It is like the delete operator as a function.
ECMAScript6 JavaScript Method Reflect

Reflect.get()

The static Reflect.get() method works like getting a property from an object (target[propertyKey]) as a function.
ECMAScript6 JavaScript Method Reflect

Reflect.getOwnPropertyDescriptor()

The static Reflect.getOwnPropertyDescriptor() method is similar to Object.getOwnPropertyDescriptor(). It returns a property descriptor of the given property if it exists on the object, undefined otherwise.
ECMAScript6 JavaScript Method Reflect

Reflect.getPrototypeOf()

The static Reflect.getPrototypeOf() method is the same method as Object.getPrototypeOf(). It returns the prototype (i.e. the value of the internal [[Prototype]] property) of the specified object.
ECMAScript6 JavaScript Method Reflect

Reflect.has()

The static Reflect.has() method works like the in operator as a function.
ECMAScript6 JavaScript Method Reflect

Reflect.isExtensible()

The static Reflect.isExtensible() method determines if an object is extensible (whether it can have new properties added to it). It is similar to Object.isExtensible(), but with some differences.
ECMAScript6 JavaScript Method Reflect

Reflect.ownKeys()

The static Reflect.ownKeys() method returns an array of the target object's own property keys.
ECMAScript6 JavaScript Method Reflect

Reflect.preventExtensions()

The static Reflect.preventExtensions() method prevents new properties from ever being added to an object (i.e. prevents future extensions to the object). It is similar to Object.preventExtensions(), but with some differences.
ECMAScript6 JavaScript Method Reflect

Reflect.set()

The static Reflect.set() method works like setting a property on an object.
ECMAScript6 JavaScript Method Reflect

Reflect.setPrototypeOf()

The static Reflect.setPrototypeOf() method is the same method as Object.setPrototypeOf(). It sets the prototype (i.e., the internal [[Prototype]] property) of a specified object to another object or to null.
ECMAScript6 JavaScript Method Reflect

Reflect.enumerate()

The static Reflect.enumerate() method used to return an iterator with the enumerable own and inherited properties of the target object, but has been removed from the ECMAScript standard in edition 7 and is deprecated in browsers.
ECMAScript6 JavaScript Method Obsolete Reflect