Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2016.
The handler.get() method is a trap for the [[Get]] object internal method, which is used by operations such as property accessors.
The following parameters are passed to the get() method. this is bound to the handler.
targetThe target object.
propertyA string or Symbol representing the property name.
receiverThe this value for getters; see Reflect.get(). This is usually either the proxy itself or an object that inherits from the proxy.
The get() method can return any value, representing the property value.
This trap can intercept these operations:
Or any other operation that invokes the [[Get]] internal method.
The proxy's [[Get]] internal method throws a TypeError if the handler definition violates one of the following invariants:
The following code traps getting a property value.
The following code violates an invariant.
| ECMAScript® 2027 Language Specification # sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 20, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.