-
Notifications
You must be signed in to change notification settings - Fork 0
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
callbacks scope #2
Comments
Hey, I'm not sure to understand. If specified, the scope (third parameter), will determine the value of |
Yes that what I mean :) |
It would be more like :
Not cool ;) |
With the enhancement become
|
Yep, I'll do it an publish a new version |
Hello again,
I got your scope logic with the third transition.add() parameter, but to put the fsm object context in scope, You have to add transition manually with add() after object declaration :
var fsm = new FSM();
fsm.add(['foo', function () { ... }, fsm, 'bar']);
fsm.add(['bar', function () { ... }, fsm, 'foo']);
This is just a life hacking but perhaps the fsm object as default scope is nice... To keep the array init possible...?
The text was updated successfully, but these errors were encountered: