Esta traducción está incompleta. Por favor, ayuda a traducir este artículo del inglés.

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


All traps are optional. If a trap has not been defined, the default behavior is to forward the operation to the target.

A trap for Object.getPrototypeOf.
A trap for Object.setPrototypeOf.
A trap for Object.isExtensible.
A trap for Object.preventExtensions.
A trap for Object.getOwnPropertyDescriptor.
A trap for Object.defineProperty.
A trap for the in operator.
A trap for getting property values.
A trap for setting property values.
A trap for the delete operator.
A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.
A trap for a function call.
A trap for the new operator.

Some non-standard traps are obsolete and have been removed.


Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
La definición de 'Proxy Object Internal Methods and Internal Slots' en esta especificación.
Standard Initial definition.
ECMAScript Latest Draft (ECMA-262)
La definición de 'Proxy Object Internal Methods and Internal Slots' en esta especificación.
Draft The enumerate handler has been removed.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
apply491218 No3610
construct491218 No3610
defineProperty491218 No3610
deleteProperty491218 No3610
enumerate No No37 — 47 No No No
get491218 No3610
getOwnPropertyDescriptor491218 No3610
getPrototypeOf No No49 No No No
has491218 No3610
isExtensible ? ?31 No ? ?
ownKeys4912181 No3610
preventExtensions491222 No3610
set491218 No3610
setPrototypeOf ? ?49 No ? ?
FeatureAndroid webviewChrome para AndroidEdge mobileFirefox para AndroidOpera AndroidiOS SafariSamsung Internet
apply4949 Si1836105.0
construct4949 Si1836105.0
defineProperty4949 Si1836105.0
deleteProperty4949 Si1836105.0
enumerate No No No37 — 47 No No No
get4949 Si1836105.0
getOwnPropertyDescriptor4949 Si1836105.0
getPrototypeOf No No No49 No No No
has4949 Si1836105.0
isExtensible ? ? ?31 ? ? ?
ownKeys4949 Si18136105.0
preventExtensions4949 Si2236105.0
set4949 Si1836105.0
setPrototypeOf ? ? ?49 ? ? ?

1. In Firefox 42, the implementation got updated to reflect the final ES2015 specification: The result is now checked if it is an array and if the array elements are either of type string or of type symbol. Enumerating duplicate own property names is not a failure anymore.

See also

Etiquetas y colaboradores del documento

Colaboradores en esta página: fscholz
Última actualización por: fscholz,