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
However, it still fails because there is no batchNum associated with this event:
The problem is that I changed can-define to use canEvent.trigger, which triggers real DOM events if it's a DOM element. However this fails because there is no batch stuff happening now.
So I'm not sure how to fix this now. I suppose maybe canEvent.trigger might need to do some batching.
@matthewp I've been thinking about this probably and how it relates to can-operate.onKeyValue. Some event systems won't have a batchNum. It might be possible to "force" this via the onKeyValue symbol / setup. Can explain more later.
Activity
matthewp commentedon Feb 3, 2017
I'll create a test with an object that has its own mini event emitter system so we can better look at the solution.
Test for defining a DOM element
matthewp commentedon Feb 3, 2017
Added a test here: c93641f
matthewp commentedon Feb 3, 2017
@justinbmeyer I did a quick and dirty implementation that uses the element's native addEventListener here: 4fbb7eb
The result of that change is that the DOM events now fire but the property events do not (without that change the opposite happens).
Use existing add/removeEventListener for elements
Use existing add/removeEventListener for elements
matthewp commentedon Mar 6, 2017
Last I left off with this there was a problem with can-observation expecting 3 argument events.
I patched my local can-observation to fix this:
However, it still fails because there is no batchNum associated with this event:
The problem is that I changed can-define to use canEvent.trigger, which triggers real DOM events if it's a DOM element. However this fails because there is no batch stuff happening now.
So I'm not sure how to fix this now. I suppose maybe canEvent.trigger might need to do some batching.
justinbmeyer commentedon Mar 6, 2017
@matthewp I've been thinking about this probably and how it relates to
can-operate.onKeyValue
. Some event systems won't have a batchNum. It might be possible to "force" this via theonKeyValue
symbol / setup. Can explain more later.justinbmeyer commentedon Apr 19, 2017
@matthewp
can-operate
only expects aonKeyValue
that will be called with the new value. We should talk about what this will mean for this effort.matthewp commentedon Jan 12, 2018
Just noting that this never was fully fixed, should revisit.