propertyName
Event fired when a property on the list changes values.
handler(event, newValue, oldValue)
Handlers registered on propertyName
events will be called
back as follows.
import {DefineList} from "can";
const list = new DefineList();
list.set("totalCount", 500);
list.on("totalCount", (event, newVal, oldVal) => {
console.log(newVal); //-> 5
console.log(oldVal); //-> 500
});
list.set("totalCount", 5);
Parameters
- event
{Event}
:An event object.
- newVal
{*}
:The new value of the
propertyName
property. - oldVal
{*}
:The old value of the
propertyName
property.