Skip to content

FOLLOW-UP: Dev-mode warning for unrecognized event names in isDOMEventTrigger (from PR #49) #51

@adnaan

Description

@adnaan

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.warn in 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions