maccman/macgap — pull request #14 by hildjj (2012-01-15 15:54:24+00:00)
Title: Added support for callbacks and menus

Tested callbacks on sound completion, then went on to support menus. Note: there are likely still some memory leaks due to the JavaScriptCore bridging fighting with ARC.

To use:
macgap.menu.getItem("File").submenu().addItem("Foo", "", function() { console.log("Foo!"); })