The <task-list> element dispatches a change event whenever it is changed. This includes when the properties, like name or color, change as well as when the list's items change order.
When the "Add" button is clicked, the <task-list> will dispatch and add event.
When the list's collapsed state changes, like when the button toggles it, the collapsed event will be dispatched.
If a <task-list> element is added as a child to another <task-list> element, the top-level <task-list> element will dispatch a nested event.
If the drag and drop feature is enabled, the <task-list> element will dispatch an added event whenever an item is dragged into the list, and a removed event whenever an item is dropped in a different list than it was dragged from.
In this example, each event fired by the <task-list> element is listened for and the event's data is logged out to the event log, below: