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
can.Map events Object missing target property #1082
Comments
Are you using target? Afaik, it is not documented. Sent from my iPhone
|
I noticed this in an app. Obviously, I can work around using I noticed that none of the CanJS event objects are documented (probably a separate issue worth fixing) so yes, strictly speaking, |
I'd agree with @ccummings on this. There is a difference between "We forgot to document it" and "It is an undocumented API" and I'm pretty sure that for something as exposed as the event API the former is the case. What would be the problem with adding it back in? |
I think there was a performance reason. Make sure you check the live-binding performance after adding it back in. |
Just to see the effect, I made We don't necessarily have to make |
Ok, that sounds good. |
In this commit ed24af0 by @justinbmeyer
can.batch.trigger
was changed to callcan.dispatch
instead ofcan.trigger
. This has the effect of removing the target property (normally added bycan.trigger
from the event object for attribute and change events emitted from can.Map.Here's a simple fiddle demonstrating the 2.1.1 behavior: http://jsfiddle.net/W3kDk/
Here's the same example but with the latest build (what will be 2.1.2): http://jsfiddle.net/nM4Lt/
Can probably fix this easily by passing an event Object with
type
andtarget
properties tocan.batch.trigger
instead of just the event name.The text was updated successfully, but these errors were encountered: