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

trusted events modifier #6137

Closed
Kapsonfire-DE opened this issue Mar 27, 2021 · 3 comments · Fixed by #6149
Closed

trusted events modifier #6137

Kapsonfire-DE opened this issue Mar 27, 2021 · 3 comments · Fixed by #6149

Comments

@Kapsonfire-DE
Copy link
Contributor

Is your feature request related to a problem? Please describe.
To make events like on:click not programmatical callable, I wish the events to check if the event isTrusted. Problem is, i have to check it in each function.

Describe the solution you'd like
A eventModifier like |once or |passive - call it trusted
<button on:click|trusted={() => console.log('Trusted event'); }></button>

@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Jun 26, 2021
@Kapsonfire-DE
Copy link
Contributor Author

Kapsonfire-DE commented Jun 26, 2021 via email

@stale stale bot removed the stale-bot label Jun 26, 2021
dummdidumm pushed a commit that referenced this issue Jun 27, 2021
Fixes #6137

Adding a trusted modifier to make events not be dispatchable by console/sourcecode.
Useful to prevent injected code to automatically dispatch event for preventing botting
@Conduitry
Copy link
Member

This has been added in 3.39.0.

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

Successfully merging a pull request may close this issue.

3 participants