---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# handler.get()

The **`handler.get()`** method is a trap for getting a property
value.

## Syntax

```js
new Proxy(target, {
  get(target, property, receiver) {
  }
});
```

### Parameters

The following parameters are passed to the `get()` method. `this`
is bound to the handler.

- `target`
  - : The target object.
- `property`
  - : The name or `Symbol` of the property to get.
- `receiver`
  - : Either the proxy or an object that inherits from the proxy.

### Return value

The `get()` method can return any value.

## Description

The **`handler.get()`** method is a trap for getting a property
value.

### Interceptions

This trap can intercept these operations:

- Property access: `proxy[foo]` and `proxy.bar`
- [`Reflect.get()`](../../../globals/Reflect/get.mdx)

Or any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).

### Invariants

If the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.

- The value reported for a property must be the same as the value of the corresponding
  target object property if the target object property is a non-writable,
  non-configurable own data property.
- The value reported for a property must be undefined if the corresponding target
  object property is a non-configurable own accessor property that has
  `undefined` as its `[[Get]]` attribute.
