Skip to content

FOLLOW-UP: Resolve data-lvt-target at setup time in setupFxDOMEventTriggers (from PR #94) #96

Description

@adnaan

Context

This follow-up task was identified during the review of PR #94.

Source PR: #94
PR Title: feat: scroll enhancements — data-lvt-target for scroll effects, lvt-scroll-away, bottom-sticky first-run
Suggested by: @claude[bot]

Task Description

In setupFxDOMEventTriggers, resolveTarget(el) is called on every event fire (click, keydown, etc.) rather than once at setup time. Since resolveTarget is a simple querySelector/closest call, this is low-cost, but resolving at setup time would:

  1. Match the pattern used in scroll-away.ts
  2. Avoid repeated DOM queries on high-frequency events like mouseenter

Low priority — resolveTarget is cheap and the current approach handles dynamic DOM correctly.


This issue was automatically created by prmonitor from PR review comments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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