Search completed in 1.37 seconds.
Menu - Archive of obsolete content
(assume we've defined a
getrecenttweets(), which invokes a callback with an array of strings.) when the menu is shown, it displays a "loading..." item.
... if the menu remains open when
getrecenttweets() receives data from the network and calls done(), the "loading..." item is replaced with the tweets, one item per tweet: this example will not work on os x due to a platform bug in firefox.
...jetpack.menu.add({ label: "recent tweets", menu: new jetpack.menu({ beforeshow: function (menu) { menu.set("loading...");
getrecenttweets(function done(tweets) menu.set(tweets)); } }) }); when the user selects some text on a page, the context menu normally displays a simple item that searches for it.