The <task-board>
element provides a layout for <task-list>
elements. This includes a header and footer, as well as a horizontally-scrolling section for the lists.
Because every <task-list>
and <task-card>
element each dispatch their associated events - and because each of those events bubble - the <task-board>
element, itself, does not need to dispatch any events. Even without native events, the <task-board>
element can still be targeted for listening to any of the <task-list>
element's events, or <task-card>
element's events.
The <task-card>
s can be moved between lists by setting the drag-drop
attribute for each <task-list>
element that allows the drag-and-drop feature.
In this example, each <task-list>
element has a drag-drop
attribute, and events are being handled when the add
event is dispatched from a <task-list>
element, or a remove
event is dispatched from a <task-card>
element. Also, each list that contains a nested list has its add button hidden and the drag-drop
attribute ommitted, to prevent any tasks from being assigned to a <task-list>
that has nested <task-list>
s.