1. Model /** * The Model. Model stores items and notifies * observers about changes. */ var ListModel = function (items) { this ._items = items; this ._selectedIndex = -1; this .itemAdded = new Event( this ); this .itemRemoved = new Event( this ); this .selectedIndexChanged = new Event( this ); }; ListModel.prototype = { getItems : function () { return [].concat( this ._items); }, addItem : function (item) { this ._items.push(item); this .itemAdded.notify({item: item}); }, removeI...