Skip to content
These are temporary community docs. The official docs are in progress.Help improve them
Markless
Esc
↑↓navigate↵open⌘Jpreview
On this page

MARKLESS_ELEMENT_HANDLE_RENDER_READ

The markup reads an element() handle while the page renders.

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

What happened

An element does not exist yet while the page renders. So the markup cannot read an element() handle.

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

MARKLESS_ELEMENT_HANDLE_RENDER_READ: Cannot render "<source>" because "<handleName>" is an element() handle, not serializable graph state.
During initial render the browser DOM element does not exist, and browser resume does not rerun component bodies. Element handles are available to lazy event or behavior code after resume locates the host node.
Read DOM properties inside an event handler or attach behavior, and render serializable state() or computed() data instead.
https://markless.dev/errors/MARKLESS_ELEMENT_HANDLE_RENDER_READ

Words in angle brackets change from case to case.

How to fix it

Read the element inside an event handler or an attach behavior. Show state values in the markup instead.

Where it comes from

@markless/compiler raises this code. Source:

Read how to read a Markless error, or go back to all error codes.

Was this page helpful?