annyang
annyang copied to clipboard
Pass custom context to commands
After reading the annyang sources, I've seen that the commands are executed in the window context, or in the annyang context.
I've moved all the annyang logic in a separate js file, and my commands contains a method call, this.method();. But actually this is undefined.
Expected Behavior
It should be possible to customize the commands context, like what is already done for callbacks.
Maybe there is already a way of doing this, but I didn't find it.
Keep up with the good work ! :)
What is the status on this? It would be marvelous to attach some context to callback.