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

Directives event #162

Closed
jacobmischka opened this issue Dec 8, 2016 · 1 comment
Closed

Directives event #162

jacobmischka opened this issue Dec 8, 2016 · 1 comment

Comments

@jacobmischka
Copy link
Contributor

The docs mention calling set() with event as an argument, and that does indeed work great. Would it be possible to be able to call event methods (preventDefault()/stopPropagataion(), essentially) without needing to create a method?

That would prevent needing to do things like the following:

preventCloseModal(event){
	event.preventDefault();
},

If not, it's not a problem as this works perfectly, but since event is being injected into the method calls already, would this be possible?

Thank you! 🐣

@Rich-Harris
Copy link
Member

Great idea! #170 – also adds support for calling methods on this (the node), which can be useful very occasionally

Rich-Harris added a commit that referenced this issue Dec 9, 2016
Allow event handlers to call methods of `event` and `this`
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

No branches or pull requests

2 participants