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 you to specify when function context #76

Closed
jhollingworth opened this issue Jan 24, 2015 · 2 comments
Closed

Allow you to specify when function context #76

jhollingworth opened this issue Jan 24, 2015 · 2 comments

Comments

@jhollingworth
Copy link
Contributor

Often you want to call another component function from within a when handler. Right now there's no way to set the function context so you end up having to assigning functions to local variables.

Ideally you should be able to optionally pass in a function context as the second argument (when(handlers, context)). The problem is we already set the function context to the handlers so that you can call other handlers.

Not sure how to solve this, needs some thought.

@oliverwoodings
Copy link
Contributor

we already set the function context to the handlers so that you can call other handlers

Do you mean so you can do things like this.pending()? If so, is that really that useful? I would have thought being able to access the component scope would be far more useful than the when scope.

@jhollingworth
Copy link
Contributor Author

This is has been implemented in v0.9 (#184)

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

No branches or pull requests

2 participants