I noticed that classes that extend ObservableObject aren't able to be event targets since they don't implement the onKeyValue or onEvent symbols. Trying to set up a listener for an event on the class results in an error, e.g:
class Todo extends ObservableObject {
...
}
class CreatedTodos extends StacheElement {
...
connected() {
this.listenTo(Todo, "created", (ev, created) => {
this.todos.unshift(created);
})
}
}
This will cause the error "Uncaught Error: can-event-queue: Unable to bind created".
To resolve this Justin suggested I add the can-event-queue/map/map mixin to mixin-typeevents.js.
I noticed that classes that extend ObservableObject aren't able to be event targets since they don't implement the
onKeyValue
oronEvent
symbols. Trying to set up a listener for an event on the class results in an error, e.g:This will cause the error "Uncaught Error: can-event-queue: Unable to bind created".
To resolve this Justin suggested I add the
can-event-queue/map/map
mixin tomixin-typeevents.js
.