AddItem: function (sender, args)
sender. Event source.
args. Event information.
The AddItem event occurs on adding an item to the Breadcrumb component.
To execute the example, create the Breadcrumb component that has a collection of BreadcrumbItem child items. Add handlers for the AddItem and BeforeAddItem events:
bread.BeforeAddItem.add(function (sender, args) {
console.log("BeforeAddItem");
});
bread.AddItem.add(function (sender, args) {
alert("AddItem");
});
After executing the example, before adding an item, that is, on selecting an item from the drop-down list displayed on pressing the button, the browser console displays the BeforeAddItem message. The AddItem message appears in the screen in the handle of adding an item.
See also: