---
title: MARKLESS_ELEMENT_HANDLE_REQUIRED
description: "The el prop gets something other than an element() handle."
sidebar: { hidden: true }
search: { keywords: ["ELEMENT_HANDLE_REQUIRED","element handle required","markless error"] }
pagination: false
---

**Error** from the compiler, while it builds your `.tsrx` files.

## What happened

The `el` prop only accepts a handle made with `element()`.

Markless prints the message, the reason, and a suggestion:

```text
MARKLESS_ELEMENT_HANDLE_REQUIRED: Cannot bind el={<handleName>} because "<handleName>" is <actual>, not an element() handle.
DOM elements are host resources. el can only bind element() handles so resume can recover the current DOM locator without serializing a DOM node.
Create a handle with element<T>() and bind that handle with el={handle}. Keep DOM-backed resources in attach={...}.
https://markless.dev/errors/MARKLESS_ELEMENT_HANDLE_REQUIRED
```

Words in angle brackets change from case to case.

## How to fix it

Create a handle with `element()`, then pass it to `el`.

```tsrx
const field = element<HTMLInputElement>();

<input el={field} />
```

## Where it comes from

`@markless/compiler` raises this code. Source:

- [packages/compiler/src/passes/semantic-graph/diagnostics.ts](https://github.com/compiled-run/markless/blob/main/packages/compiler/src/passes/semantic-graph/diagnostics.ts)

Read [how to read a Markless error](/tooling/diagnostics), or go back to [all error codes](/errors).
