destructor()
Description
Removes all HTML elements of the To Do List, and detaches all related events
Usage
destructor(): void;
Example
const { ToDo, Toolbar } = todo;
const { tasks, users, projects, tags } = getData();
const list = new ToDo("#root", {
tasks,
users,
projects,
});
const toolbar = new Toolbar("#toolbar", {
api: list.api,
});
// remove List
list.destructor();
// remove Toolbar
toolbar.destructor();