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
Hi,
thanks a lot for awesome pub-sub implementation!
Not sure if it's bug, or if I'm missing something, so let's call this issue a question first. Readme states: ... In addition, should you need it, these methods are fully compatible with the jQuery.proxy() method, in case you not only want more control over to which context the subscribed callback is bound, but want to be able to very easily unsubscribe via callback reference. ...
However, I don't think it does or don't understand how I could bind custom context to subscribed callback. Because it always falls back to the main o object: o.trigger.apply(o, arguments);
Could you please add example of $.proxy usage into readme in the case it's really possible?
Have a nice day,
Luk
PS: Perhaps you mean it is compatible with jQuery.proxy when supplying the callback: $.subscribe('foo', $.proxy(createLogger, $someContext, 'foo'));?
`
The text was updated successfully, but these errors were encountered:
Hi,
thanks a lot for awesome pub-sub implementation!
Not sure if it's bug, or if I'm missing something, so let's call this issue a question first. Readme states:
... In addition, should you need it, these methods are fully compatible with the jQuery.proxy() method, in case you not only want more control over to which context the subscribed callback is bound, but want to be able to very easily unsubscribe via callback reference. ...
However, I don't think it does or don't understand how I could bind custom context to subscribed callback. Because it always falls back to the main
o
object:o.trigger.apply(o, arguments);
Could you please add example of
$.proxy
usage into readme in the case it's really possible?Have a nice day,
Luk
PS: Perhaps you mean it is compatible with jQuery.proxy when supplying the callback:
$.subscribe('foo', $.proxy(createLogger, $someContext, 'foo'));
?`
The text was updated successfully, but these errors were encountered: