564
edits
(Created page with '== JEP 21 - jetpack.toolbar == * Champion: David Dahl <ddahl at mozilla dot com> * Status: Planning * Type: API Track * Created: 27 July 2009 * Reference Implementation: jetpack…') |
|||
| Line 16: | Line 16: | ||
Create an easy way to get a handle on the navigation toolbar, the bookmarks toolbar. Provide an elegant API to add, modify and remove items for each bar, as well as hiding and showing the toolbars. | Create an easy way to get a handle on the navigation toolbar, the bookmarks toolbar. Provide an elegant API to add, modify and remove items for each bar, as well as hiding and showing the toolbars. | ||
< | <pre>jetpack.toolbar.navigation() // returns an abstracted "jetpacky" nav bar object | ||
bookmarks bar object | |||
jetpack.toolbar.navigation.children() // gets the child objects in an array-like object | |||
jetpack.toolbar.bookmarks.children() // ditto | |||
var obj = {title: "my button", onclick: function(){}, ... } | |||
jetpack.toolbar.navigation.append(obj, [before_idx]) / .remove(idx) | |||
var obj = {title: "GrouchoMarx.com", url:"http://grouchomarx.com/", ... } | |||
jetpack.toolbar.bookmarks.append(obj, [before_idx]) / .remove(idx) | |||
var toolbar = jetpack.toolbar.create({id:'groucho-toolbar', name: 'GrouchoToolbar', children: [...]}) | |||
jetpack.toolbar.append | |||
... | ... | ||
edits