You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do highly respect your JavaScripts and maybe my suggestion is nonsense, I'd be happy for a hint what you would do.
Here's my scenario:
I have several models that subscribe to events from a socket. With eve, the binding would look like:
eve.on('change/Model_xyz',function(){ ... })
There are tons of bindings all around the place. My understanding is that I could not simply unbind the particular event above, I'd need to wrap the anonymous function into some method (e.g. Model.make_stuff) and then pass this method when I do an unbind, correct?
eve.unbind('change/Model_xyz',Model.make_stuff)
I wonder if it would make sense to extend the implementation of eve, so that I could use a simple string to scope a bind/unbind. It my example, it would look like:
Hey Dimitry,
I do highly respect your JavaScripts and maybe my suggestion is nonsense, I'd be happy for a hint what you would do.
Here's my scenario:
I have several models that subscribe to events from a socket. With eve, the binding would look like:
There are tons of bindings all around the place. My understanding is that I could not simply unbind the particular event above, I'd need to wrap the anonymous function into some method (e.g.
Model.make_stuff
) and then pass this method when I do an unbind, correct?I wonder if it would make sense to extend the implementation of eve, so that I could use a simple string to scope a bind/unbind. It my example, it would look like:
What do you think? Does that make any sense to you?
The text was updated successfully, but these errors were encountered: