SC.loadPackage({ 'MenuItemUndo': { comment: 'I am the MenuItem for Undo.', traits: ['MenuItem'], sharedProperties: { menuContainer: { initValue: '
' } }, methods: { init: { comment: 'I init the MenuItem.', code: function(theDocumentMenu){ this.delegate('MenuItem', 'init', theDocumentMenu); this.set({ isActionButton: true }); this.get('menuButton').addEventListener('mouseup', function(){ SuperGlue.get('history').do('undo'); }, false); } } } }});