Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[🚀 esl-event-listener]: add possibility to see event handler code in the browser #983

Closed
NastaLeo opened this issue May 12, 2022 · 4 comments
Assignees
Labels

Comments

@NastaLeo
Copy link
Collaborator

NastaLeo commented May 12, 2022

As an ESL consumer I want to be able to navigate to source code of exact event handler in the browser (event listeners tab) in case event is subscribed by @listen decorator

Example:

  // We are searching for its method
  @listen('click')
  onClick(): void {
    console.log('click');
  }

image

@NastaLeo NastaLeo added the waits triage Issue that waits to be reviewed and handled label May 12, 2022
@ala-n ala-n changed the title [esl-utils/listen]: add possibility to see event handler code in the browser [🚀 esl-utils/listen]: add possibility to see event handler code in the browser May 14, 2022
@ala-n ala-n added bug Something isn't working needs assignee and removed waits triage Issue that waits to be reviewed and handled labels May 14, 2022
@ala-n
Copy link
Collaborator

ala-n commented May 14, 2022

Really good case, thanks a lot @NastaLeo !
We need to see if there is a possibility to make exact handler function acessible with chrome dev tools.

@ala-n
Copy link
Collaborator

ala-n commented May 19, 2022

🎉 This issue has been resolved in version 4.0.0-beta.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@fshovchko fshovchko removed their assignment May 24, 2022
@ala-n ala-n self-assigned this Jun 2, 2022
@ala-n ala-n added this to the ⭐ Release 4.0.0 milestone Jun 2, 2022
@ala-n
Copy link
Collaborator

ala-n commented Aug 29, 2022

The issue was resolved by the possibility of seeing the ESLEventListener object as a DOM Event subscription when getEventListeners($0) is called through the browser console.

It is also enhanced by passing the original bound handler for simple cases (when delegation is not required).
Note: according to the current ESL Event Listeners API, the ESLEventListener instances are considered as low-level API and recommended to be avoided for user cases (including being inaccessible as a second param for listener handlers)

@ala-n ala-n closed this as completed Aug 29, 2022
@ala-n
Copy link
Collaborator

ala-n commented Oct 5, 2022

🎉 This issue has been resolved in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ala-n ala-n added the released label Oct 5, 2022
@ala-n ala-n modified the milestones: ⭐ Release 4.0.0, ⚡ESL 4.*.* Bugfix & support Oct 6, 2022
@ala-n ala-n changed the title [🚀 esl-utils/listen]: add possibility to see event handler code in the browser [🚀 esl-event-listener]: add possibility to see event handler code in the browser May 25, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants