-
Notifications
You must be signed in to change notification settings - Fork 0
FOLLOW-UP: Dev-mode warning for unrecognized event names in isDOMEventTrigger (from PR #49) #51
Description
Context
This follow-up task was identified during the review of PR #49.
Source PR: #49
PR Title: feat: extend lvt-el: and lvt-fx: to support native DOM event triggers
Suggested by: @claude[bot] (multiple reviews)
Task Description
isDOMEventTrigger intentionally accepts any string not in the lifecycle or synthetic trigger sets, which supports custom events. However, a typo like lvt-el:addClass:on:clck silently registers a listener that never fires.
Consider adding a dev-mode console.warn for event names that don't appear in a known-events allowlist. This would help authors debug non-firing triggers while still allowing custom events.
Possible approach:
- Maintain a set of common DOM events (click, focusin, focusout, mouseenter, mouseleave, keydown, etc.)
- If the trigger name is not in the set, emit
console.warnin development mode only - Keep the open acceptance behavior — the warning is advisory, not blocking
Original Comments
"isDOMEventTrigger accepts any string not in LIFECYCLE_SET or SYNTHETIC_TRIGGERS as a native DOM event. A typo silently registers a listener that never fires. Consider a dev-mode console.warn" — @claude[bot]
This issue was automatically created by prmonitor from PR review comments.