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

Allow console calls in event handlers? #782

Closed
Rich-Harris opened this issue Aug 22, 2017 · 1 comment · Fixed by #854
Closed

Allow console calls in event handlers? #782

Rich-Harris opened this issue Aug 22, 2017 · 1 comment · Fixed by #854

Comments

@Rich-Harris
Copy link
Member

Via Gitter — might be nice if console was a special case in event handlers:

<button on:click='console.log(event)'>click me</button>

Would make it easier to understand the values of this and event. There might be some other globals we should whitelist (alert? jk jk... or am I) but console is the most obvious one.

@roman-vanesyan
Copy link

IMO whitelisting is a hell, developers force themselves when choose that approach. It's still better to create extra method.

Rich-Harris added a commit that referenced this issue Sep 19, 2017
allow console.* calls in event handlers
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 a pull request may close this issue.

2 participants