Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: add event handlers of HTML through addEventListener #62

Merged
merged 7 commits into from
Jan 15, 2025

Conversation

AylenHoz
Copy link
Contributor

@AylenHoz AylenHoz commented Jan 8, 2025

πŸ”— Linked issue

closes #61

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Add event handlers of HTML generated by Youch through addEventListener instead of using inline event handlers

πŸ“ Checklist

  • I have read the contribution guide.
  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

src/helpers.ts Outdated Show resolved Hide resolved
tests/templates.spec.ts Outdated Show resolved Hide resolved
@AylenHoz
Copy link
Contributor Author

AylenHoz commented Jan 9, 2025

When you see the PR @thetutlage, could you create a test version for the meantime, please? To be able to run my app and test other features

@thetutlage
Copy link
Member

I was thinking to add the event handler functions within the script file directly. For example: The error stack event handlers can live here. https://github.com/poppinss/youch/blob/4.x/src/public/error_stack/script.js

@AylenHoz
Copy link
Contributor Author

@thetutlage I agree with the suggested approach. I implemented the changes following this new approach :)

tests/templates.spec.ts Outdated Show resolved Hide resolved
@thetutlage thetutlage merged commit 961aac2 into poppinss:4.x Jan 15, 2025
7 checks passed
@thetutlage
Copy link
Member

Alright. That looks good. Thanks for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content-Security-Policy conflicts with inline event handlers
2 participants