Use the public on method when listening#3615
Conversation
There was a problem hiding this comment.
Why is this necessary - won't it be gced anyway
|
Hold off on this for today, it has an issue because the other library won't update |
|
"The other library" ? Also, |
ecdaed6 to
b076de8
Compare
This uses a private `listening` var to share state between a Backbone "listener" and "listenee", instead of using a private `internalOn()` to share state. This allows `#listenTo` to use the public `#on` method and keeps interop between Backbone and any other event library.
b076de8 to
4bd7ec8
Compare
|
I've just revised the implementation to use a hybrid approach between #3455 and #3594. If the listenee is using Backbone's JsPerf tends to like the implementation, except Chrome doesn't like
Can you explain? |
A more descriptive name for what the property signifies.
|
Is there any chance this PR will be merged? |
|
@DomBlack +1 @jridgewell Do you need any help? |
|
@jridgewell I tried to rebase and fix merge errors in #4043 but a bunch of tests fails. Could you help me? |
|
Any updates on this? I've merged master into it in #4131, if that helps at all. |
Fixes #3611.
This uses a private
listeningvar to share state between a Backbone"listener" and "listenee", instead of using a private
internalOn()toshare state. This allows
#listenToto use the public#onmethod andkeeps interop between Backbone and any other event library.
http://jsperf.com/internal-listening-public-on