insertItem

insertItem( id, beforeNode, wrapper, beforePermanent )
Not in SeaMonkey 1.x
Return type: element
Add an item with the given id to the toolbar. The new item is added just before the item given by the second argument. If the second argument is null, but the beforePermanent argument is true, the item is added to the beginning of the toolbar before the first permanent item. Otherwise, if the beforePermanent argument is false, the new item is added to the end of the toolbar. The third argument can be used to wrap the new item in another element. Usually, the last argument will be null as it is mainly for the use of the customize dialog.

The id should match an element in the toolbar's toolbarpalette. Some special ids may also be used to create special spacing items:

  • separator: A separator, which is drawn as a vertical bar.
  • spacer: A non-flexible space.
  • spring: A flexible space.

The method returns the DOM element for the created item.

 

Document Tags and Contributors

 Contributors to this page: Sheppy, JaredWein, Philip Chee, Marsf, Mgjbot, Nickolay, Dria
 Last updated by: Sheppy,