Element() cannot be created at module scope
The message
MARKLESS_ELEMENT_MODULE_SCOPE: Cannot create element handle "<name>" at module scope.
Element handles are per-render DOM locators. A module-scope handle would be shared across requests and cannot point at one document-owned host element.
Move element() creation into the component that owns the host element and bind it with el={handle}.
https://markless.dev/errors/MARKLESS_ELEMENT_MODULE_SCOPEWords in angle brackets change from case to case.
Why
Element handles are per-render DOM locators. A module-scope handle would be shared across requests and cannot point at one document-owned host element.
Fix
Move element() creation into the component that owns the host element and bind it with el={handle}.