Nasi wolontariusze nie przetłumaczyli jeszcze tego artykułu na język Polski. Dołącz do nas i pomóż go przetłumaczyć!
Można także przeczytać artykuł w języku English (US).

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.


Unlike most global objects, Reflect is not a constructor. You can not use it with a new operator or invoke the Reflect object as a function. All properties and methods of Reflect are static (just like the Math object).


The Reflect object provides the following static functions which have the same names as the proxy handler methods. Some of these methods are the same as corresponding methods on Object.

Calls a target function with arguments as specified by the args parameter. See also Function.prototype.apply().
 The new operator as a function. Equivalent to calling new target(...args).
Similar to Object.defineProperty(). Returns a Boolean.
The delete operator as a function. Equivalent to calling delete target[name].
A function that returns the value of properties.
Similar to Object.getOwnPropertyDescriptor(). Returns a property descriptor of the given property if it exists on the object,  undefined otherwise.
Same as Object.getPrototypeOf().
The in operator as function. Returns a boolean indicating whether an own or inherited property exists.
Same as Object.isExtensible().
Returns an array of the target object's own (not inherited) property keys.
Similar to Object.preventExtensions(). Returns a Boolean.
A function that assigns values to properties. Returns a Boolean that is true if the update was successful.
A function that sets the prototype of an object.


Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Reflect' in that specification.
Standard Initial definition.
ECMAScript Latest Draft (ECMA-262)
The definition of 'Reflect' in that specification.
Living Standard Reflect.enumerate has been removed.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic Support491242 No3610
apply491242 No3610
construct491242 No3610
defineProperty491242 No3610
deleteProperty491242 No3610
enumerate No No No No No No
get491242 No3610
getOwnPropertyDescriptor491242 No3610
getPrototypeOf491242 No3610
has491242 No3610
isExtensible491242 No3610
ownKeys491242 No3610
preventExtensions491242 No3610
set491242 No3610
setPrototypeOf491242 No3610
FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support4949 (Yes)42 No3610
apply4949 (Yes)42 No3610
construct4949 (Yes)42 No3610
defineProperty4949 (Yes)42 No3610
deleteProperty4949 (Yes)42 No3610
enumerate No No No No No No No
get4949 (Yes)42 No3610
getOwnPropertyDescriptor4949 (Yes)42 No3610
getPrototypeOf4949 (Yes)42 No3610
has4949 (Yes)42 No3610
isExtensible4949 (Yes)42 No3610
ownKeys4949 (Yes)42 No3610
preventExtensions4949 (Yes)42 No3610
set4949 (Yes)42 No3610
setPrototypeOf4949 (Yes)42 No3610

See also

Autorzy i etykiety dokumentu

 Ostatnia aktualizacja: fscholz,